Loading an image, how do I get its dimensions?

I am loading an image (xxx.loadImage() ), and would like to get its dimensions through the code, as the image varies a little bit from version to version. How can I achieve this?

Hi there!

You can use xxx.getHeight() and xxx.getWidth(). More info here.

Hello,

I was using ofGetHeight/Width() and of course it wasn’t working as desired…

Thanks much

“ofSomething…” it’s reserved for things with a general scope, like settings of the application or getting some info from your system. I think this ofBook migth be helpful for you. It’s still a work in progress, but it’s great.