-
convert image to binary code Scripting
Hi guys!
I’m trying to add an png image to my script and I do it with this method:
res = "group{orientation:'column', alignment:['fill', 'fill'], alignChildren:['fill', 'fill'],\
myMooco: Group{ orientation:'row', alignment:['right', 'fill'],\
},\}"
var moocoImg = File ("./MOOCO_LOGO_Script.png");
var icon = myPanel.grp.myMooco.add ('image', undefined, moocoImg);It works fine but I have problems launching it with the adobe extendscript toolkit CC (if I do it via file+script+runscript it works fine). When I push the play button it gives me the error “invalid image data ” from this line:
var icon = myPanel.grp.myMooco.add ('image', undefined, moocoImg);I supose it doesnt find the image for some reason. Anyway, is there a way to convert images to binary code so I can write that code to mi file and avoid inserting the png file?
Thanks!