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
MagickGetPage usage
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: MagickGetPage usage
I use
I think MagickGetPage has something to do with the virtual canvas rather than the actual image dimensions.
Pete
Code: Select all
width = MagickGetImageWidth(mw);
height = MagickGetImageHeight(mw);
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.
See my message in this topic for a link to a zip of all the files.
Re: MagickGetPage usage
Thanks Pete. Greate help. MagickGetImageWidth works for me.el_supremo wrote:I useI think MagickGetPage has something to do with the virtual canvas rather than the actual image dimensions.Code: Select all
width = MagickGetImageWidth(mw); height = MagickGetImageHeight(mw);
Pete