Page 1 of 1

[done] Image dimensions wrong after calling MagickCropImage

Posted: 2009-01-18T10:53:49-07:00
by broucaries
Hi

From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512207

>It seems that they are a bug on imagewand (program here http://bugs.debian.org/cgi-bin/bugrepor ... bug=512207)
>In the first test, I crop the same image twice:

> MagickCropImage(wand, 300, 300, 50, 50);
> MagickCropImage(wand, 250, 250, 0, 0);

>The resulting image should be 250x250 (from 50 to 300 of the original
>image along both directions). Instead it's 200x200 (from 50 to 250). It
>seems that the second crop is still applied to the original image, not
>to the cropped one; the resulting image is the _intersection_ of the two
>cropped regions.

Thank you very much.

Regards

Bastien

Re: Image dimensions wrong after calling MagickCropImage

Posted: 2009-01-18T11:07:37-07:00
by magick
Between crops add
  • MagickResetImagePage(wand,(const char *) NULL);
This resets the image virtual canvas. See http://www.imagemagick.org/Usage/crop/#crop_repage.

Re: Image dimensions wrong after calling MagickCropImage

Posted: 2009-01-18T11:10:07-07:00
by broucaries
Thank you will send to user :)

Regards

Bastien