Skip to content

Instantly share code, notes, and snippets.

@jonnu
Created January 25, 2012 13:36
Show Gist options
  • Save jonnu/1676286 to your computer and use it in GitHub Desktop.
Save jonnu/1676286 to your computer and use it in GitHub Desktop.
pngstrip (using pngcrush)
#!/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