Commit graph

1 commit

Author SHA1 Message Date
Matthias Krüger
b3fe980d70 add woptipng png compression script
An improved version of the wesnoth-optipng shell script.

Supports multiple jobs at a time. ( -j )
Accepts a threshold for discarding images which were only reduced by a few bytes. ( -t 15 will only save images that were reduced in size by at least 15 %).
Niceness can be set using the -n switch.

Usage:
cd <directory>
woptipng . ../some/dir  ../some/some_file.png

The script should achive better compression ratios than the previous script.
The previous script was running optimizations in an unconditional loop and, at the end, did not save the image if pixel colors changed.
This implies if *one* of the crushers did a bad job and changed the images content in a bad way, *none* of the possibly good optimizations by the other crushed would be saved.
Woptipng checks the image every time after a crusher touched it and only reverts a single optimization if it was bad leaving possibility for the other tools to still perform a good job and reduce size of the image.
2016-12-22 15:27:43 +01:00