\ .\" This man page was generated by the Netpbm tool 'makeman' from HTML source. .\" Do not hand-hack it! If you have bug fixes or improvements, please find .\" the corresponding HTML page on the Netpbm website, generate a patch .\" against that, and send it to the Netpbm maintainer. .TH "Pnmquant User Manual" 0 "09 April 2013" "netpbm documentation" .SH NAME pnmquant - quantize the colors in a Netpbm image to a smaller set .UN synopsis .SH SYNOPSIS \fBpnmquant\fP [\fB-center\fP|\fB-meancolor\fP|\fB-meanpixel\fP] [\fB-floyd\fP|\fB-fs\fP] [\fB-nofloyd\fP|\fB-nofs\fP] [\fB-spreadbrightness\fP|\fB-spreadluminosity\fP] \fIncolors\fP [\fIpnmfile\fP] .PP All options can be abbreviated to their shortest unique prefix. You may use two hyphens instead of one to designate an option. You may use either white space or equals signs between an option name and its value. .UN description .SH DESCRIPTION .PP This program is part of .BR "Netpbm" (1)\c \&. .PP \fBpnmquant\fP reads a PNM image as input. It chooses \fIncolors\fP colors to best represent the image, maps the existing colors to the new ones, and writes a PNM image as output. .PP This program is simply a combination of \fBpnmcolormap\fP and \fBpnmremap\fP, where the colors of the input are remapped using a color map which is generated from the colors in that same input. The options have the same meaning as in those programs. See their documentation to understand \fBpnmquant\fP. .PP It is much faster to call \fBpnmcolormap\fP and \fBpnmremap\fP directly than to run \fBpnmquant\fP. You save the overhead of the Perl interpreter and creating two extra processes. \fBpnmquant\fP is just a convenience. .PP Here is an example of the relationship between the programs: .PP This: .nf \f(CW $ pnmquant 256 myimage.pnm >/tmp/colormap.pnm >myimage256.pnm \fP .fi .PP does essentially this: .nf \f(CW $ pnmcolormap 256 myimage.pnm >/tmp/colormap.pnm $ pnmremap -mapfile=/tmp/colormap.pnm myimage.pnm >myimage256.pnm \fP .fi .PP \fBpnmquant\fP did not exist before Netpbm 9.21 (January 2001). Before that, \fBppmquant\fP did the same thing, but only on PPM images. \fBppmquant\fP continues to exist, but is only a front end (for name compatibility) to \fBpnmquant\fP. .UN seealso .SH SEE ALSO .BR "pnmcolormap" (1)\c \&, .BR "pnmremap" (1)\c \&, .BR "ppmquantall" (1)\c \&, .BR "pamdepth" (1)\c \&, .BR "ppmdither" (1)\c \&, .BR "ppmquant" (1)\c \&, .BR "pnm" (5)\c \& .SH DOCUMENT SOURCE This manual page was generated by the Netpbm tool 'makeman' from HTML source. The master documentation is at .IP .B http://netpbm.sourceforge.net/doc/pnmquant.html .PP