|
Revision 984, 0.5 kB
(checked in by nk, 4 years ago)
|
|
adding pncrush script to make pngs smaller
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | |
|---|
| 3 | # there can be as many input arguments as you want |
|---|
| 4 | # they are all assumed to be PNG file names |
|---|
| 5 | |
|---|
| 6 | # run as sh pngcrush $(ls *png) |
|---|
| 7 | |
|---|
| 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 |
|---|
| 14 | rm "$1" |
|---|
| 15 | # replace the original with the new optimized output file |
|---|
| 16 | mv "$1".tmp "$1" |
|---|
| 17 | shift |
|---|
| 18 | done |
|---|
| 19 | |
|---|
| 20 | exit 0 |
|---|
| 21 | |
|---|
| 22 | # from http://cvs.sourceforge.net/viewcvs.py/tom7misc/vstplugins/scripts/fixpng?rev=1.2&view=auto |
|---|