John Papastergiou
John Papastergiou

Reputation: 1019

Imagemagick scale and image quality

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 ?

Upvotes: 6

Views: 17669

Answers (4)

Adam Taylor
Adam Taylor

Reputation: 4839

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

Upvotes: 5

ilgam
ilgam

Reputation: 4450

Using -quality 80 -adaptive-resize is better for larger photos.

If you need to blur the output, use -interpolative-resize instead of -adaptive-resize

Upvotes: 2

Richard
Richard

Reputation: 61499

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

Upvotes: 12

Bonzo
Bonzo

Reputation: 5299

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

Upvotes: 9

Related Questions