Hi all!
I'd like to embed images in my .jsxbin, but i'm at loss when i think about extracting bytes from my file in javascript.
I saw nab's implementation with hexes, creating temp images and reading from there, but while effective it's quite ankward.
Do any of you know a simpler approach? I'd like to deploy only one file instead of three. Thanks!
Max
Embedding images into a script
Moderator: Paul Tuersley
Max Pareschi Director | VFX supervisor | CG Artist & Designer | Bonsaininja Studio
Not sure it is simpler, but here is another road I've explored.
Assuming we are dealing with little iconic image, typically of size less 50x50 px, you can sample every image pixel and create for each pixel a 1px group (with backgroundColor set to the current pixel color).
In this demo, the icon image is the first selected layer, and layer sampling is done using sampleImage() expression.
LayerToUIImage.jsx.zip

Assuming we are dealing with little iconic image, typically of size less 50x50 px, you can sample every image pixel and create for each pixel a 1px group (with backgroundColor set to the current pixel color).
In this demo, the icon image is the first selected layer, and layer sampling is done using sampleImage() expression.
LayerToUIImage.jsx.zip
