Created
August 7, 2015 21:42
-
-
Save edenwaith/1d1353a6d8efbabfa455 to your computer and use it in GitHub Desktop.
Use pngcrush to batch reduce the size of a collection of PNG images
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 | |
# Reference: | |
# http://www.mactricksandtips.com/2012/02/installing-and-using-pngcrush-on-your-mac.html | |
for png in `find $1 -name "*.png"`; | |
do | |
echo "crushing $png" | |
pngcrush -rem allb -brute -reduce "$png" temp.png | |
mv -f temp.png $png | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment