Image dimensions prior to displaying

Hi,

is there anyway to get the dimensions of an image before displaying it on the screen? I’m doing some calculations and based on those I want to display the image at that size, is this possible without displaying the image on screen first?

thanks, [import]uid: 44767 topic_id: 17285 reply_id: 317285[/import]

Unfortunately, the only way to do this is to either know the dimensions beforehand (in which you could use display.newImageRect()), or, depending on if the performance of your app will require it, you could call dispay.newImage(), immediately hide it (set isVisible to false) then extract the width/height into some local variables and remove the object.

It’s not very efficient, but if it’s executed during a time where performance isn’t crucial, it should be fine. [import]uid: 52430 topic_id: 17285 reply_id: 65328[/import]