Image Width/Height finder?

Hello all, first topic here!
I’ve managed to make piece of code that effectively layers different image components on top of one another to make a single image. (Think layers in an image editor like GIMP, and then exporting it to png.) There’s a slight issue however - it only works on 16x16 images for now as that’s the type of sprites I’ve used it to make. (It’s also ridiculously unoptimized but I’ll cross that bridge when I make it there.) I can’t seem to find any way to read the width and height of images. Is there a code block I’m missing or is there a bit of JavaScript code I could use to read the height and/or width of the image?
Many thanks!

1 Like

You’re right there, there is a javascript code for it… no clue what it is, but it should be around here somewhere! Amazing program btw!

1 Like

mySprite.image.width measure the width of the image for mySprite you can also do this with height

1 Like

Javascript (replace <sprite> with your variable:

<sprite>.image.width

Blocks (found in the Sprites block category):

1 Like