Changing the image to base64 code
Copy link to clipboard
Copied
Hi, can someone tell me how to change image.jpg to base64 code in HTML5 canvas file? Animate generates JS with images in this form: {src:"img1.jpg", id:"img1"},{src:"img2.jpg", id:"img2"}, etc.
Is there any way I can change to base64 code?
This is an HTML5 animated banner.
Copy link to clipboard
Copied
Hi.
Do you want Animate to publish the assets as base64 code?
Copy link to clipboard
Copied
Hello this is exactly what i need. do you have any clue how to get the binary format of the image?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hello, how to include those scripts? I am really struggling when i am exporting svgs with an extension and all the images are included in a /img path. Then i manually have to edit the svg file and add the converted base 64 string (through https://www.base64-image.de/) for each image! There is a line in the javascript files of the extension
var bitmapURI=this._getBitmapItem(item);
that will generate the name of the file but i need to access the source binary format. from where is this coming?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
thanks for your reply but i do not think it will work. i need to export through the extension Flash2SVG, there is a file SVG.jsfl at the extension that i am trying to edit the code with no luck. I found the line that it will print the images paths inside the .svg and i am trying to print the base64 instead of the path. Might be simple but i am lost. I also have a function iside that file that can convert a string to base 64 that is working correctly But if i tell the script to convert base64 it will convert the "img/my_image.png" to base64 (and not the main image to base64!) If you have some time to play and would like to help you can get the extension src here, the file i mention and looks that is the main exporter is inside. https://github.com/TomByrne/Flash2Svg
Copy link to clipboard
Copied
ok.

