1. Installation
wget http://pngquant.org/pngquant-2.8.2-src.tar.gz
Tar-xzf pngquant-2.8.2-src.tar.gz
CD pngquant-2.8.2
Installation dependency: Yum install Libpng-devel
./configure
Make && make install
OK, the installation is complete.
Pngquant-h See if normal, if reported: Pngquant:error while loading shared libraries:liblcms2.so.2:cannot open shared object File:no su CH File or directory
Re-install LIBLCMS2, yum install http://pkgrepo.linuxtech.net/el6/release/x86_64/liblcms2-2.4-1.el6.x86_64.rpm solve
Options
See for full pngquant -h
list of options.
-
-
--ext new.png
-
-
-
Set custom extension for output filename. By default -or8.png
or is -fs8.png
used.
-
-
--quality min-max
-
-
Instructs to use the pngquant
least amount of colors required to meet or exceed the max quality. If conversion results in quality below min the quality the image won ' t is saved (if outputting to stdout, 24-bit Origina L'll be output) and would pngquant
exit with status code 99.
min maxand is numbers in range 0 (worst) to [perfect], similar to JPEG.
pngquant --quality=65-80 image.png
-
-
--speed N
,
-sN
-
-
Speed/quality trade-off from 1 (brute-force) to ten (fastest). The default is 3. Speed ten have 5% lower quality, but is 8 times faster than the default.
-
-
--iebug
-
-
Workaround for IE6, which only displays fully opaque pixels. Would make pngquant
almost-opaque pixels fully opaque and would avoid creating new transparent colors.
-
-
--version
-
-
Print version information to stdout.
-
-
-
-
-
Read image from stdin and send result to stdout.
-
-
--
-
-
Stops processing of arguments. This allows use of the file names that start with -
. If you ' re using pngquant
in a script, it's advisable to put the this before file names:
pngquant $OPTIONS -- "$FILE"
Near lossless compression with pngquant command PNG image size reduced by about 70%