Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pngcrush « dev « scripts - dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 82fa1d53a26e35828e12fb1306afd517b9d99997 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# there can be as many input arguments as you want
# they are all assumed to be PNG file names

# run as sh pngcrush $(ls *png)

# loop through all arguments
while (( $# >= 1 )); do
	# create temp output file
	# output file has all colorspace chunks removed and optimized compression
	pngcrush -l 9 "$1" "$1".tmp
	# remove the original file
	rm "$1"
	# replace the original with the new optimized output file
	mv "$1".tmp "$1"
	shift
done

exit 0

# from http://cvs.sourceforge.net/viewcvs.py/tom7misc/vstplugins/scripts/fixpng?rev=1.2&view=auto