MagickGetPage usage

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
mlin@pelmorex.com

MagickGetPage usage

Post by mlin@pelmorex.com »

Hi
I have tried to get the image size from the following code, but it does not give me the right values to me (the result value is 0, 0), the code is as follows:
MagickWandGenesis();
image=NewMagickWand();
status = MagickReadImage(image, srcimage);
MagickGetPage(image, &width, &height, &x, &y);
printf(after get page, size is: %d %d\n", (int)width, (int)height);

any suggestion on what is wrong here?

btw, I used the identify command and found the images have right geometry settings such as 256x256+0+0. the images are either png or tga format
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: MagickGetPage usage

Post by el_supremo »

I use

Code: Select all

    width = MagickGetImageWidth(mw);
    height = MagickGetImageHeight(mw);
I think MagickGetPage has something to do with the virtual canvas rather than the actual image dimensions.
Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
mlin@pelmorex.com

Re: MagickGetPage usage

Post by mlin@pelmorex.com »

el_supremo wrote:I use

Code: Select all

 width = MagickGetImageWidth(mw);
height = MagickGetImageHeight(mw);
I think MagickGetPage has something to do with the virtual canvas rather than the actual image dimensions.
Pete
Thanks Pete. Greate help. MagickGetImageWidth works for me.
Post Reply