Last active
July 31, 2017 20:17
-
-
Save t-richards/9190609 to your computer and use it in GitHub Desktop.
Wrapper for pngcrush: removes almost all chunks, overwrites original file.
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
#!/usr/bin/env bash | |
if [ $# -eq 0 ] | |
then | |
echo "Usage: crush <pngfile(s)>" | |
exit | |
fi | |
for img in "$@" | |
do | |
pngcrush -force -rem allb -reduce -brute "$img" "${img%*.}crush.png" | |
mv "${img%*.}crush.png" "$img" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment