Last active
August 27, 2019 11:02
-
-
Save jesse-c/ac39a2ee76eea2fc1d14ff55bc950623 to your computer and use it in GitHub Desktop.
Use pngcrush to recursively optimise and replace PNGs (used on macOS)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
find "$1" -type f -iname '*.png' -print0 | while IFS= read -r -d '' file; do | |
echo "crushing $file" | |
pngcrush -rem alla -reduce -brute "$file" temp.png | |
mv -f temp.png "$file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment