Page 1 of 1

image does not contain geometry

Posted: 2008-10-18T16:01:10-07:00
by spesho

Code: Select all

image.read(IN_FILE);//OK
unsigned int w = image.columns(); // BAD ... some way too large number for width!!!
Geometry gg(image.rows(),image.columns());//it is OK!
Geometry g = image.geometry();//exception type:MagickOption
i have a trivial opening a file example with trying to get the dimensions of the picture/canvas !

see the comment in the code of my problem. and my big questions is why i do have an exception of type MagickOption
when trying to read the geometry of ANY file format (tried *miff *png *tif)!!!
error: "image does not contain geometry"
???
any hint will be appreciated

Re: image does not contain geometry

Posted: 2008-10-19T11:06:45-07:00
by magick
The image.geometry() method has little to do with Geometry(). image.geometry() returns the geometry for certain composite operations such as DisplaceCompositeOp so in the majority of cases it will return an exception.