So for my previous entry I had to create an image. Screenshot, paste into Photoshop, save as PNG. Done. Now a thumbnail: save-for-web, 50% scale, PNG. Done.
Erm.
-rw-rw-r-- 1 james james 16K 2008-04-07 13:42 error-message-large.png -rw-rw-r-- 1 james james 33K 2008-04-07 13:43 error-message-thumb.png
Something's not quite right here: the half-sized thumbnail is taking up twice the space.
error-message-large.png: PNG image data, 1001 x 126, 8-bit/color RGB, non-interlaced error-message-thumb.png: PNG image data, 500 x 63, 8-bit/color RGBA, non-interlaced
Okay, so maybe it's the colour space - RGBA is storing more data. Not, you know, twice as much data, but 32 bit rather than 24 bit is going to hurt in some way. So I go back in, resize the image in Photoshop, and save as PNG using the same options as for the large one.
-rw-rw-r-- 1 james james 26K 2008-04-07 13:45 error-message-small.png error-message-small.png: PNG image data, 500 x 63, 8-bit/color RGB, non-interlaced
Okay, so reducing the colour space to 24 bit does what we expect: reduces the filesize by a quarter. It still doesn't explain why the original is so much smaller. Okay, well Photoshop also comes with ImageReady, so perhaps that can help.
Input | Dimensions | Input size | Optimised size |
---|---|---|---|
large | 1001x126 | 16K | 15.29K |
thumb | 500x63 | 32.1K | 32.12K |
small | 500x63 | 25.7K | 25.36K |
large resized | 500x63 | ~4K | 29.04K |
The last row is the interesting one: when resizing in ImageReady, it generates a 4K image... then optimises it to 29K.
For what it's worth, GIMP doesn't do any better. Anyone have any idea what's going on, or is it just pixies?