Posted Oct 4, 2010 19:29 UTC (Mon) by mjr (guest, #6979)
[Link]
Fist, my comment about the corner icon was, of course, mostly in jest - even if it does, in a very small part, illustrate that size optimality isn't something that everyone pays a lot attention to. (Not that it's a huge deal, really, just a fact of life.)
Second, amusingly the header.png you link also has a useless alpha channel, and optipng -o7 can shave off a whole 17131 bytes (16.22%) off of it. There are probably a lot of such pictures out there - I think gimp produces pngs with empty alpha channels by default when the source image has it, even if the exported (possibly flattened) bitmap doesn't require it. I wonder if that should be a bug.
Anyway, optipng is a nice tool to run at least for images that'll be served lots and lots of times. Even if you don't use the slow, -o7 "obsessive-compulsive" mode, it can often improve on the compression settings a bit. More importantly, it will remove that spurious alpha channel and also do other color type/bit depth/palette reductions where appropriate.
(Being myself a tad OCD, checked that the header.png "only" reduced by 16976 bytes or 16.07% using optipng's fast 8-trial default settings. For comparison, -o7 runs through 240 trials of different setting combinations.)
PNG saving and optimization
Posted Oct 4, 2010 19:39 UTC (Mon) by mjr (guest, #6979)
[Link]
Oops, misread output, correction: The header.png alpha channel is _not_ useless, and therefore not dropped by optipng either. The improved compression numbers are still correct, though.
PNG saving and optimization
Posted Oct 4, 2010 22:09 UTC (Mon) by johill (subscriber, #25196)
[Link]
Err, ok, I've optimised the image now with that tool (fwiw, back when it was created, I could only find pngcrush to use). But anyway, that wasn't really my point -- my point was that caching doesn't seem to play as big a role as one might be tempted to think.
PNG saving and optimization
Posted Oct 8, 2010 23:38 UTC (Fri) by man_ls (subscriber, #15091)
[Link]
Well, now you have the chance to try it out in practice: has the traffic surged because of the change in the icon? Has it slowed down after everyone cached the new version?
Advdef can squeeze files even more.
Posted Oct 6, 2010 7:30 UTC (Wed) by gmatht (guest, #58961)
[Link]
"... size optimality isn't something that everyone pays a lot attention to."
Quite right. If they did, they would run "advdef -z -4" after optipng ;)
I can shave another 11k off header.png and 1k off lcorner.png using advdef. The KDE project uses a script "optimizegraphics" to run these two optimizations on their graphics files.
Advdef can squeeze files even more.
Posted Oct 6, 2010 7:36 UTC (Wed) by johill (subscriber, #25196)
[Link]
Well, maybe our esteemed editor needs to write an article on this, because otherwise nobody's going to even find the tools.... :-)
Note also that you may not always even be allowed to use advdef, because it appears to link to something called MAME, which states "Redistributions may not be sold, nor may they be used in a commercial product or activity." Thus I'd rather stay away from it.
Advdef can squeeze files even more.
Posted Oct 6, 2010 8:54 UTC (Wed) by jbh (subscriber, #494)
[Link]
It's ok: it appears to be straight GPLv2, plus an exception allowing it to be linked with MAME.