Imagemagick scale and image quality

10,985

Solution 1

-scale is quick but I belive -resize or -thumbnail is better and you can use any filters you like.

Solution 2

Using -sharpen 0x1.2 with -resize x% with -quality 95 produces good results for me.

Solution 3

I was trying to create thumbnails of PDFs and was getting poor results until I added -density 400, which is a suggestion I found here. Below is an example of the difference it can make. I got the PDF from here. Look at the bear and also the lines behind the bird.

Without -density 400

Full command: convert -resize 500x500 catalog.pdf[0] catalog-page1-resized.png

File size: 180 KB

Image without -density 400

With -density 400

Full command: convert -density 400 -resize 500x500 catalog.pdf[0] catalog-page1-resized.png

File size: 185 KB

Image with -density 400

Share:
10,985
John Papastergiou
Author by

John Papastergiou

Updated on June 04, 2022

Comments

  • John Papastergiou
    John Papastergiou almost 2 years

    I'm scaling an image down to 50% of its ratio with the convert command and -scale parameter. The generated image quality is pretty bad. Is there any extra option i can use to get a better result ?

  • Robert
    Robert over 4 years
    quality goes this way up: --thumbnail, --scale, --resize