is there a way to get size of sprite asset with code?

i know how to get it in asset viewer: i’d like to get its width and height in code, to auto-scale it.
thanks,

1 Like

Try this.

function setup() 
    s=readImage(asset.builtin.Planet_Cute.Character_Horn_Girl)
    print(s.width)
    print(s.height)
end
1 Like

neat, thanks, that’ll work for me.

1 Like