Hi,
I have a problem, when I call MagickCore::RotateImage with for example -90 degrees, the return image size is not adjusted according to rotation (for example, swap width and height of result image). This results in distortion.... and the method seems to be useless with that feature. How could I call this method to get the image with correct dimensions?
ImageMagick-6.5.0-1
Thanks,
MagickCore RotateImage
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: MagickCore RotateImage
try +distort SRT
see http://www.imagemagick.org/Usage/distorts/#srt
I don't know the API equivalents.
see http://www.imagemagick.org/Usage/distorts/#srt
I don't know the API equivalents.
Re: MagickCore RotateImage
Are you using the call properly. Here's an example:
- rotate_image = RotateImage(image, 90, exception);
printf("%lu %lu => %lu %lu\n", image->columns, image->rows, rotate_image->columns, rotate_image->rows);
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: MagickCore RotateImage
Their are ways of fixing the rotated image to bring it back to the original size.
See IM examples, Simple Image Warping, Rotating Images
http://www.imagemagick.org/Usage/warping/#rotate
However you may prefer to use the newer Distort Images, which uses a different technique and provides more control of the pixel level distortion that any form of rotation generates
Distorting Images, Scale-Rotate-Translate (SRT) Distortion
http://www.imagemagick.org/Usage/distorts/#srt
See IM examples, Simple Image Warping, Rotating Images
http://www.imagemagick.org/Usage/warping/#rotate
However you may prefer to use the newer Distort Images, which uses a different technique and provides more control of the pixel level distortion that any form of rotation generates
Distorting Images, Scale-Rotate-Translate (SRT) Distortion
http://www.imagemagick.org/Usage/distorts/#srt
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/