Skip to main content
Known Participant
Oct 19, 2023 11:24 AM UTC
Question

Changing the image to base64 code

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.

This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

kglad
Community Expert
Community Expert
Oct 19, 2023 2:28 PM UTC
Participant
Dec 3, 2023 12:01 PM UTC

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?

Translate
kglad
Community Expert
Community Expert
Dec 3, 2023 12:23 PM UTC

@Asa246722338dy7 

 

use the include tab of the actions panel.

Translate
JoãoCésar17023019
Community Expert
Community Expert
Oct 19, 2023 1:05 PM UTC

Hi.

 

Do you want Animate to publish the assets as base64 code?

Translate
Participant
Dec 3, 2023 11:57 AM UTC

Hello this is exactly what i need. do you have any clue how to get the binary format of the image?

Translate