Resized images have jagged \ sawtooth edges

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Post a URL to one of your images and its corresponding thumbnail versions from your older version of ImageMagick and the new version. We need to see the results to account for any differences.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We're using this command with ImageMagick 6.2.6-5 and we got reasonable results:
  • convert -size 200x200 1012405M.jpg -resize 200x200 image.jpg
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Ok, we got reasonable results with this command:
  • convert -size 110x110 1012405M.jpg -resize 110x110 +strip -quality 92 image.jpg
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

What is the IM version on your ISP. It looks like it is not anti-aliasing the resized pixels correctly. Probably a very old version.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

It looks like no anti-aliasing was used during the resize, but anti-aliasing is turned on by deafault for a very long time in IM.

The only other time I have seen images like this is when I set wrong WIDTH and HEIGHT attributes on the <IMG> html tag (the browsers don't anti-alias image they resize).

The only other thing I can think of is perhaps it is a problem of too many colors in GIF, but GIF generally has enough colors (256) so that it isn't this bad, becided you are using JPEG.

PS: I would use a -size for JPEG that is at least double the final resize size
just to be sure it is resize that gives the final image size and not the JPEG library.

Hmmm could the JPEG library on the ISP me very old?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply