Image dimensions?

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
brianp22
Posts: 9
Joined: 2011-12-14T11:39:37-07:00
Authentication code: 8675308

Image dimensions?

Post by brianp22 »

Is there an easy way to get the dimensions of an image (width/height) without opening and reading the whole image? Perhaps using wand?

Reading a Jpeg2000 image can be expensive when all I need is the image width and height to allocate memory.....

Thanks!
-brian
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Image dimensions?

Post by magick »

Use ping() instead of read(). Ping just reads enough of an image to get its width / height / size / format.
Post Reply