Page MenuHomePhabricator

Figure out png compression tools for static/project-logos
Closed, ResolvedPublic

Description

Also it looks like the 1x logos are all getting smaller while it's a tossup for 1.5x/2x... maybe we do need that last pngout step?

After digging around, it turns out pngout is non-free software: https://www.jonof.id.au/kenutils.html "The source code for these tools is not public. Don't bother asking.".

So we currently run:

  • pngquant
  • zopflipng

I read through http://optipng.sourceforge.net/pngtech/optipng.html which explains how lossless PNG compression works. We should also try out:

Event Timeline

I believe optipng -o7 was listed there some time ago. No idea why it was removed.

I ran through the first two rows of https://commons.wikimedia.org/wiki/Wikipedia/2.0#SVG and found that after running pngquant and zopflipng, optipng and advpng could provide no additional compression.

zopflipng and advpng are both using the zopfli compression algorithm so that doesn't surprise me that whatever runs later doesn't have an effect. pngquant is technically lossy compression, so it doesn't surprise me that optipng (lossless) can't beat it.

In theory it's possible that in the future optipng or advpng could have better compression or new techniques to shave off a few more bytes, but at this point I'd rather keep the toolchain simple and not include them.

Change 660978 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[operations/mediawiki-config@master] logos: Remove TODO for pngout

https://gerrit.wikimedia.org/r/660978

Change 660978 merged by jenkins-bot:
[operations/mediawiki-config@master] logos: Remove TODO for pngout

https://gerrit.wikimedia.org/r/660978

Legoktm claimed this task.