resizing without loosing quality

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
jessiefangulis
Posts: 2
Joined: 2015-06-04T14:57:52-07:00
Authentication code: 6789

resizing without loosing quality

Post by jessiefangulis »

Hi there,

Happy Thursday. I'm new here, so my apologies for the lack of experience with the program and lack of familiarity with the terminology. I'm trying to resize some png files and am currently using the command:

mogrify -resize 13% *.png

The new size looks fantastic, but the quality of the images is so poor that it is not usable (these images are screenshots from an iphone).

I've tried using the quality parameter (e.g. mogrify -resize 13% -quality 92 *.png), but regardless of the value I use for it, it doesn't seem to make much of a difference. The images will be inserted into a Word document. If I use the original images and resize them in Word, the quality is much better. Unfortunately, I can't just do that because my document will include hundreds of these (and it will need to be updated frequently in the next few months), so that would take a very long time to do manually.

Is there any way to resize the images using mogrify, preserving as much of the quality as possible? (I realize some loss of quality is inherent in the resizing process, but it would be nice if they are legible :-)).

thank you very much for your help!

Jessie
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: resizing without loosing quality

Post by fmw42 »

-quality 92 is not appropriate for PNG. See http://www.imagemagick.org/script/comma ... hp#quality and viewtopic.php?f=1&t=27672

You can also try setting a different filter for -resize, such as -filter catrom. See http://www.imagemagick.org/script/comma ... php#filter and http://www.imagemagick.org/Usage/filter/
jessiefangulis
Posts: 2
Joined: 2015-06-04T14:57:52-07:00
Authentication code: 6789

Re: resizing without loosing quality

Post by jessiefangulis »

Thank you. I really appreciate your help.

I've now adjusted the quality parameter to 75 (but I have to confess it was almost impossible for me to follow the text for the first link, given that I don't know anything about file formats, compression or filters). I'm also now using -filter catrom. So, the result is a bit better, but most of the text is still not very legible. :-(

The command I'm using now is:

mogrify -resize 13% -filter catrom -quality 75 *.png

Any other suggestions to improve the quality of the resized images would be greatly appreciated!

thank you,

Jessie
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: resizing without loosing quality

Post by fmw42 »

From the first link:

"The quality setting has no effect on the appearance or signature of PNG and MNG images, since the compression is always lossless."

Perhaps you need to upload an example image to some place like dropbox.com and put the URL here, so others can see what quality you are starting with and try to reproduce. Also please provide your IM version and platform. If you are using an old version of IM, there may be bugs, so please upgrade to the latest version.

Also put the filter before -resize. Also try one image with convert rather than mogrify to test your results.

A reduction in size to 13% is quite a reduction and the result may not be as good as the original.

You could also try -filter point before -resize or just use -scale rather than -resize and see if either of those is better for you.
Post Reply