Page 1 of 1

Image dimensions?

Posted: 2012-01-03T08:20:22-07:00
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

Re: Image dimensions?

Posted: 2012-01-03T11:30:18-07:00
by magick
Use ping() instead of read(). Ping just reads enough of an image to get its width / height / size / format.