AnsweredAssumed Answered

in_memory png to base64 string

Question asked by JALevine on Feb 24, 2017
Latest reply on Feb 24, 2017 by JALevine

Does anyone know how to convert an in memory png to a base64 string?


My raster is defined as:

png = "in_memory\my_png.png"


I then try to convert it:

import base64

base64_string = str(base64.b64encode(png))


base64_string gets populated as: aW5fbWVtb3J5XG15X3BuZy5wbmc=


Which, when decoded is: in_memory\my_png.png


...not exactly what I had in mind.  Is this even possible do do in a geoprocessing script?