Sven Neumann wrote:
>> I took KSnapshot out of the picture, and took the screenshot with Gimp,
>> saved it as a png. The file size was 35k. I scaled the image by 50%
>> and saved it as a new png. The file size was 44k.
>> I reduced the file by 50% using imageMagick and the file size was 71k.
>> convert file1.png -resize 50% file3.png
>> I did an imagemagick identify on file2 (44k) and file3 (71k), and they
>> both display the dimensions as 340x272.
>> The image is a snapshot of the body of the KDE Kate editor, which is
>> mostly text.
> Oh, then the answer is simple. The scaled-down version compresses not as
> good as the original size.
To clarify: The original image probably contains a relatively small
number of distinct colors. Resizing by 50% introduces a large number
of new colors that are shades of the original. (Resizing doesn't simply
throw away 3/4 of the pixels. Each new pixel is an average of several
original pixels.) The smaller image is actually much more complex than
the larger one and therefore more difficult to compress using PNG's
> PNG uses run-length compression,
The compression is lossless, but it's not run-length. PNG uses an LZ77
> which works very nicely on graphics that have areas of solid colors.
> By scaling down the image, you make the image less suitable for this
> kind of compression.
Gimp-user mailing list