Created
January 25, 2012 13:36
-
-
Save jonnu/1676286 to your computer and use it in GitHub Desktop.
pngstrip (using pngcrush)
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/bash | |
echo " " | |
shopt -s nullglob | |
for file in ./*.png; do | |
echo "Working on $file" | |
pngcrush -q -rem gAMA -rem cHRM -rem iCCP -rem sRGB $file "$file.tmp" | |
mv $file "$file.old" | |
mv "$file.tmp" $file | |
done | |
echo " " | |
echo "Complete." | |
echo " " | |
# Remove old files | |
rm -rf *.png.old |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment