2 # Optimize png files in output directory
4 find output -name "*.png" | while read png; do
5 # Reduce colors to 8bit
6 # <http://pngquant.org>
7 pngquant --skip-if-larger --force --output "$png" 256 "$png"
9 # Adjust bit depth, remove clutter
10 # <http://optipng.sourceforge.net>
11 optipng -o 1 -strip all "$png"
13 # Compress with zopfli
14 # <http://www.advancemame.it>