# wget http://downloads.sourceforge.net/project/pmt/pngcrush/1.7.88/pngcrush-1.7.88.tar.gz
# tar -xzvf pngcrush-1.7.88.tar.gz
# cd pngcrush-1.7.88
# make
# cp pngcrush /usr/bin
pngcrush使用语法
代码如下:
usage: pngcrush [options except for -e -d] infile.png outfile.png
pngcrush -e ext [other options] file.png ...
pngcrush -d dir/ [other options] file.png ...
pngcrush -ow [other options] file.png [tempfile.png]
pngcrush -n -v file.png ...
options:
-bail (bail out of trial when size exceeds best size found
-bit_depth depth (deprecated)
-blacken (zero samples underlying fully-transparent pixels)
-brute (use brute-force: try 148 different methods)
........更多内容请自己看帮助......
pngcrush简单命令
代码如下:
pngcrush -brute -e "myimage_compressed.png" myimage.png
.........省略.....
Best pngcrush method = 123 (ws 15 fm 4 zl 9 zs 1) = 124820
for output to ttlsattlsa_new.png
(1.63% critical chunk reduction)
(1.63% filesize reduction)
CPU time decoding 1.560, encoding 7.640, other 0.030, total 9.230 sec.