From 068e0d1a7e474ac7ee18273b838ad9fe29301b68 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 7 Mar 2018 23:16:16 +0100 Subject: [PATCH] recompress screenshots using zopflipng, strip using exiftool This makes them as small as possible. --- tools/png-pre-compress | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/png-pre-compress b/tools/png-pre-compress index 3edb26db9..fe9a8f411 100755 --- a/tools/png-pre-compress +++ b/tools/png-pre-compress @@ -7,5 +7,12 @@ for f in `find $(dirname $0)/../app/src/ -type f -name \*.png`; do echo $f | grep -Eo '\.9\.png$' && continue # do not optimized 9-patch, it breaks them tmpfile=$(mktemp) aapt singleCrunch -v -i $f -o $tmpfile + exiftool -all= $tmpfile mv $tmpfile $f done + +for f in metadata/*/images/*Screenshots/*.png; do + exiftool -all= $f + tmpfile=$(mktemp) + (zopflipng --filters=01234mepb --lossy_8bit --lossy_transparent -y $f $tmpfile && mv $tmpfile $f) & +done