Hi there, I have a few images I'm trying to normalize to a certain scale by resizing them. When I started resizing the images, I noticed that their volume (KB) became much larger than the original image.
I checked it out further by simply doing: convert x.png y.png And got some difference. E.g. in one case x.png is 143KB and y.png is 208KB.
Since I'm also optimizing for image size, I was wondering if anyone has an idea why this is the case and any suggestions to solve this.
I'm using Imagemagick 6.6.4-Q16 on windows 7.
Thanks, Amit
EDIT:
Thanks for the suggestion, guys, and sorry for the late reply! Here's what I tried to do and here are the results. The original image is 112KB. Doing convert with no parameters results in 169KB image. Using OptiPNG on it (PNGCrush didn't work for me) with -o7 results in 113KB. I then tried to do convert -quality X for every X between 0-99, and I found that for quality 90 I achieve a file size of 116KB, so OptiPNG is better. However - when I do convert -resize to a smaller image (proportionally), I get a 199KB with no parameters, 196KB for the best convert -quality X (x=0), and 196KB for OptiPNG. This is 75% increase in file size when I would expect the file to be smaller, since I resized the image by 35% from 377x2290 to 234x1419. Any thoughts?
Thanks!
EDIT - Images attached + the resize problem investigated:
Here is a link to the three images (look at the captions): Original image, image after simple ImageMagick convert, and the same output image after optipng. http://picasaweb.google.com/101622787022351879933/ImageMagickProblem?feat=directlink
Also, I think there might be an issue with the resize option of ImageMagick. I did the following exercise to isolate it: For every x between 1-100: convert a.png -resize x% a_x.png
As expected, the size of the image almost constantly increases from 1% to 100%. There is a slight drop in 40% and in 50%. The issue is that from 40% and on, the output image size bypasses the original image size. Only when you hit 100% there is a large drop in image size back to the original size (slightly more actually, per my first edit - 169KB instead of 112KB, and 113KB after Optipng).
Even running Optipng with -o7 on each output file doesn't correct this.
You can see the results of this experiment in the graph below: http://picasaweb.google.com/lh/photo/fFL1W6SiUfFWhBqdUf3BZg?feat=directlink