[done] Image dimensions wrong after calling MagickCropImage

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
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

[done] Image dimensions wrong after calling MagickCropImage

Post 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
Last edited by broucaries on 2009-01-18T11:15:18-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Image dimensions wrong after calling MagickCropImage

Post 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.
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

Re: Image dimensions wrong after calling MagickCropImage

Post by broucaries »

Thank you will send to user :)

Regards

Bastien
Post Reply