Hello,
when i rotate an image using the "-rotate 7" command, the resulting image looks unsharp and somewhat "flat" (less colors). Do i do something wrong? Re-sharpening it with "-sharpen 1" corrects this a bit.
Rotated image gets unsharp/less quality
- whugemann
- Posts: 289
- Joined: 2011-03-28T07:11:31-07:00
- Authentication code: 8675308
- Location: Münster, Germany 52°N,7.6°E
Re: Rotated image gets unsharp/less quality
I think that this lies in the nature of rotation: The color values of the rotated image have to be interpolated from the neighbouring pixels in the original image, and any interpolation will blur the image by some extent. The effect will be most visible in images with sharp contrasting edges, like sketch drawings or cartoon-type images.
You could however try to choose an interpolation method more suitable for your actual image content via -interpolate.
You could however try to choose an interpolation method more suitable for your actual image content via -interpolate.
Wolfgang Hugemann
Re: Rotated image gets unsharp/less quality
I see. The image i rotate is resized to about 30%. Does the order of scale/rotate matter? In my case i see no optical difference.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Rotated image gets unsharp/less quality
7 degrees is about the worst rotation angle you can get
rotate uses a fast technique (3 shears) that is fairly fuzzy. Distort produces rotations at higher quality, with much more control over that quality but at a speed cost. make sure you IM is at least version 6.6.5-0 or better still the latest you can get!
See Im examples, Simple Image Warping, Rotating a Thin Line
http://www.imagemagick.org/Usage/warping/#rotate_line
Interpolated Rotations (thin line)
http://www.imagemagick.org/Usage/misc/#interpolate_line
Distort SRT (Scale Rotate Translate)
http://www.imagemagick.org/Usage/distorts/#srt
Distort General Theory, concepts and problems with image distortions (including rotations and scaling)
http://www.imagemagick.org/Usage/distorts/#summary
Distort Super Sampling (which works VERY well for rotations)
http://www.imagemagick.org/Usage/distorts/#super_sample
rotate uses a fast technique (3 shears) that is fairly fuzzy. Distort produces rotations at higher quality, with much more control over that quality but at a speed cost. make sure you IM is at least version 6.6.5-0 or better still the latest you can get!
See Im examples, Simple Image Warping, Rotating a Thin Line
http://www.imagemagick.org/Usage/warping/#rotate_line
Interpolated Rotations (thin line)
http://www.imagemagick.org/Usage/misc/#interpolate_line
Distort SRT (Scale Rotate Translate)
http://www.imagemagick.org/Usage/distorts/#srt
Distort General Theory, concepts and problems with image distortions (including rotations and scaling)
http://www.imagemagick.org/Usage/distorts/#summary
Distort Super Sampling (which works VERY well for rotations)
http://www.imagemagick.org/Usage/distorts/#super_sample
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/