Decrease filesize when resizing with mogrify

Posted by plua on Ask Ubuntu See other posts from Ask Ubuntu or by plua
Published on 2011-02-08T23:47:11Z Indexed on 2011/02/09 7:33 UTC
Read the original article Hit count: 322

Filed under:

I love the command line options of imagemagick. Mogrify is great to resize images and change quality, which is what I use most often. However, I have noted that the filesize if often larger than what it should be. Especially with small images. For instance, I have a regular 640px (width) photo, which I change to quality 80 and a width of 80px:

mogrify -quality 80 -resize 80 file.jpg

Works well and my image gets resized and the quality is changed to 80. However, the filesize is around 40Kb. For such a tiny image, that is huge! When I use mtPaint, and open the file and save it (not changing anything, just CTRL+O, CTRL+S), the filesize decreases with more than 95% to less than 2Kb! I have seen this is often the case.

What goes wrong?

© Ask Ubuntu or respective owner

Related posts about mogrify