slitaz-forge view pkgs/shrink-icons.sh @ rev 711

Update pangolin
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jan 01 18:26:56 2020 +0100 (7 weeks ago)
parents
children
line source
1 #!/bin/sh
3 IFS=$'\n'
5 old_size=$(find . -type f -name '*.png' -exec ls -l \{\} \; | awk '{sum += $5}END{print sum}')
7 for png in $(find . -type f -name '*.png'); do
8 pngquant --speed 1 --skip-if-larger --ext .png --force "$png"
9 optipng -strip all -o7 -zm1-9 "$png"
10 done
12 new_size=$(find . -type f -name '*.png' -exec ls -l \{\} \; | awk '{sum += $5}END{print sum}')
14 echo "Finished: $old_size -> $new_size"