From: Severin Meyer Date: Tue, 11 Oct 2016 14:15:01 +0000 (+0200) Subject: Add example script that optimizes the size of badge images X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonstat.git;a=commitdiff_plain;h=6fbbd160b0d4baaabf61b0a479680bd87bc1a38e;hp=5d4149703a94ad66e9736549a2a1642eb3892e87 Add example script that optimizes the size of badge images --- diff --git a/xonstat/batch/badges/optimize.sh b/xonstat/batch/badges/optimize.sh new file mode 100755 index 0000000..7d268b9 --- /dev/null +++ b/xonstat/batch/badges/optimize.sh @@ -0,0 +1,16 @@ +#!/bin/sh -e +# Optimize png files in output directory + +find output -name "*.png" | while read png; do + # Reduce colors to 8bit + # + pngquant --skip-if-larger --force --output "$png" 256 "$png" + + # Adjust bit depth, remove clutter + # + optipng -o 1 -strip all "$png" + + # Compress with zopfli + # + #advpng -z -4 "$png" +done