I am trying to export an image from Flex application to svg. I saw that images are in the format of data uri something like this
“data:image/gif;base64,R0lGOD
lhCwAOAMQfAP////7+/vj4+Hh4eHd3d/v7+/Dw8HV1dfLy8ubm5vX19e3t7fr
6+nl5edra2nZ2dnx8fMHBwYODg/b29np6eujo6JGRkeHh4eTk5LCwsN3d3dfX
13Jycp2dnevr6////yH5BAEAAB8ALAAAAAALAA4AAAVq4NFw1DNAX/o9imAsB
tKpxKRd1+YEWUoIiUoiEWEAApIDMLGoRCyWiKThenkwDgeGMiggDLEXQkDoTh
CKNLpQDgjeAsY7MHgECgx8YR8oHwNHfwADBACGh4EDA4iGAYAEBAcQIg0Dk gcEIQA7”.
Is it possible to convert an image to the above format in as3?
Actually, you have to differentiate. The Base64 encoding takes the bytes and calculates a string. You can do the with the Base64Encoder. What you won’t get is SVG. SVG is an XML based specification. When working with SVG, you’d want to get the XML which will get interpreted by browsers to render the actual image. That doesn’t work with the Base64Encoder.