[webkit-dev] optimising png files in LayoutTests - an experiment

Mike Lawther mikelawther at chromium.org
Tue Jan 24 22:43:17 PST 2012

Hi guys,

Just thought I'd share the results of an experiment I did in optimising the
png files in LayoutTests.

I used a tool on Mac called ImageOptim (http://imageoptim.pornel.net/)
which tries a set of different png lossless optimising tools (like pngcrush
- I also downloaded and included PNGOUT). Note that this strips out some of
the stuff we need, like the hash, so if doing this for real we'd have to
watch out for that.

My results were:

$ ls -laR LayoutTests/ | grep png$ | awk '{total = total + $5}END{print

$ find LayoutTests/ | grep png$ | xargs open -a ImageOptim.app

$ ls -laR LayoutTests/ | grep png$ | awk '{total = total + $5}END{print
total, 1220535840 - total}'
937198328 283337512

So this has saved ~280MB (~23% of the original size).

Based on this, it seems worthwhile to include a png optimiser somewhere in
the patch upload/submit toolchain, and also (separately) to optimise the
existing pngs.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120124/86b42796/attachment.html>

More information about the webkit-dev mailing list