Created
December 1, 2008 14:46
-
-
Save mdp/30740 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# PNGCrush Script | |
# Copyright James Mates -- http://sial.org/blog/scripts/ | |
# Color information stripping added by Mark Percival - http://mpercival.com | |
if [ -z "$1" ]; then | |
echo "Usage: `basename $0` png-image [...]" >&2 | |
exit 1 | |
fi | |
for file in "$@"; do | |
TMPFILE=`mktemp .crush-png-tmp.XXXXXXXX` || exit 1 | |
pngcrush -brute -fix -reduce -rem gAMA -rem cHRM -rem iCCP -rem sRGB "$file" "$TMPFILE" 1>/dev/null || exit 1 | |
mv "$TMPFILE" "$file" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment