After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768212 - Optimize PNGs with zopflipng
Optimize PNGs with zopflipng
Status: RESOLVED FIXED
Product: adwaita-icon-theme
Classification: Core
Component: general
git master
Other All
: Normal enhancement
: ---
Assigned To: adwaita-icon-theme maintainer(s)
adwaita-icon-theme maintainer(s)
Depends on:
Blocks: 768307
 
 
Reported: 2016-06-29 19:24 UTC by Ville Skyttä
Modified: 2018-01-28 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use zopflipng instead of optipng for more compression (1022 bytes, patch)
2016-06-29 19:24 UTC, Ville Skyttä
none Details | Review

Description Ville Skyttä 2016-06-29 19:24:14 UTC
Created attachment 330618 [details] [review]
Use zopflipng instead of optipng for more compression

Optimizing PNGs with zopflipng -m in the adwaita-icon-theme git tree would save 2M+ in total size (tested with zopflipng from zopfli 1.0.1) with no downsides I'm aware of. For example:

find -name "*.png" -printf "%p %p\n" | xargs -L 1 -P 4 zopflipng -ym

(A similar run with optipng -o7 would save ~1M)

Attached is also a related patch to render-icon-theme.py
Comment 1 Jakub Steiner 2016-10-11 19:35:15 UTC
When zopflipng becomes widely available to consider it as a dependency, it might make more sense, for now I'd stick to optipng.


$ dnf search optipng
Last metadata expiration check: 0:00:41 ago on Tue Oct 11 21:33:17 2016.
============================= N/S Matched: optipng =============================
optipng.x86_64 : PNG optimizer and converter

$ dnf search zopflipng
Last metadata expiration check: 0:00:44 ago on Tue Oct 11 21:33:17 2016.
Error: No matches found.
Comment 2 Ville Skyttä 2016-10-11 19:53:08 UTC
(In reply to Jakub Steiner from comment #1)
> $ dnf search zopflipng
> Error: No matches found.

In Fedora (I guess that's what this was on), zopflipng is included in the zopfli package. Try e.g. "dnf provides /usr/bin/zopflipng".

It isn't available packaged in Debian/Ubuntu that I'm aware of though, in case that affects what you think of wide enough availability. Don't know about other distros.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825879
https://bugs.launchpad.net/ubuntu/+source/zopfli/+bug/1536387
Comment 3 Jakub Steiner 2017-09-26 14:23:34 UTC
I just spend 20 minutes of my life shaving off 1MB off of adwaita-icon-theme :) Ever since be6563f186f4e2516bd5b283c7584913e392eb3f zopflipng will be used for rendering optimalization.
Comment 4 Jeremy Bicha 2017-11-27 17:39:22 UTC
Ville, Debian/Ubuntu's package is named the same as Fedora's.

https://tracker.debian.org/pkg/zopfli
Comment 5 Jeremy Bicha 2017-11-27 17:40:29 UTC
Jakub, could you look at #768307 for gnome-themes-standard too?
Comment 6 Juraj Fiala 2018-01-28 10:59:40 UTC
Done!