3 # there can be as many input arguments as you want
4 # they are all assumed to be PNG file names
6 # run as sh pngcrush $(ls *png)
8 # loop through all arguments
9 while (( $# >= 1 )); do
10 # create temp output file
11 # output file has all colorspace chunks removed and optimized compression
12 pngcrush
-l 9 "$1" "$1".tmp
13 # remove the original file
15 # replace the original with the new optimized output file
22 # from http://cvs.sourceforge.net/viewcvs.py/tom7misc/vstplugins/scripts/fixpng?rev=1.2&view=auto