|
Packit |
78deda |
|
|
Packit |
78deda |
<HTML><HEAD><TITLE>Pnmquant User Manual</TITLE></HEAD>
|
|
Packit |
78deda |
<BODY>
|
|
Packit |
78deda |
pnmquant
|
|
Packit |
78deda |
Updated: 09 April 2013
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Table Of Contents
|
|
Packit |
78deda |
|
|
Packit |
78deda |
NAME
|
|
Packit |
78deda |
pnmquant - quantize the colors in a Netpbm image to a smaller set
|
|
Packit |
78deda |
|
|
Packit |
78deda |
SYNOPSIS
|
|
Packit |
78deda |
|
|
Packit |
78deda |
pnmquant
|
|
Packit |
78deda |
[-center|-meancolor|-meanpixel]
|
|
Packit |
78deda |
[-floyd|-fs]
|
|
Packit |
78deda |
[-nofloyd|-nofs]
|
|
Packit |
78deda |
[-spreadbrightness|-spreadluminosity]
|
|
Packit |
78deda |
{[-norandom]|[-randomseed=n]}
|
|
Packit |
78deda |
[-quiet]
|
|
Packit |
78deda |
[-plain]
|
|
Packit |
78deda |
ncolors [pnmfile]
|
|
Packit |
78deda |
|
|
Packit |
78deda |
All options can be abbreviated to their shortest unique prefix. You
|
|
Packit |
78deda |
may use two hyphens instead of one to designate an option. You may
|
|
Packit |
78deda |
use either white space or equals signs between an option name and its
|
|
Packit |
78deda |
value.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
DESCRIPTION
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This program is part of Netpbm.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
pnmquant reads a PNM image as input. It chooses ncolors
|
|
Packit |
78deda |
colors to best represent the image, maps the existing colors
|
|
Packit |
78deda |
to the new ones, and writes a PNM image as output.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This program is simply a combination of pnmcolormap and
|
|
Packit |
78deda |
pnmremap, where the colors of the input are remapped using a
|
|
Packit |
78deda |
color map which is generated from the colors in that same input. The
|
|
Packit |
78deda |
options have the same meaning as in those programs. See their
|
|
Packit |
78deda |
documentation to understand pnmquant.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
It is much faster to call pnmcolormap and pnmremap
|
|
Packit |
78deda |
directly than to run pnmquant. You save the overhead of the
|
|
Packit |
78deda |
Perl interpreter and creating two extra processes. pnmquant is
|
|
Packit |
78deda |
just a convenience.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Here is an example of the relationship between the programs:
|
|
Packit |
78deda |
|
|
Packit |
78deda |
This:
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
$ pnmquant 256 myimage.pnm >/tmp/colormap.pnm >myimage256.pnm
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
does essentially this:
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
$ pnmcolormap 256 myimage.pnm >/tmp/colormap.pnm
|
|
Packit |
78deda |
$ pnmremap -mapfile=/tmp/colormap.pnm myimage.pnm >myimage256.pnm
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
HISTORY
|
|
Packit |
78deda |
|
|
Packit |
78deda |
pnmquant did not exist before Netpbm 9.21 (January 2001).
|
|
Packit |
78deda |
Before that, ppmquant did the same thing, but only on PPM
|
|
Packit |
78deda |
images. ppmquant continues to exist, but is only a front end
|
|
Packit |
78deda |
(for name compatibility) to pnmquant.
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-version did not exist before Netpbm 10.75 (June 2016).
|
|
Packit |
78deda |
|
|
Packit |
78deda |
-norandom did not exist before Netpbm 10.82 (March 2018).
|
|
Packit |
78deda |
|
|
Packit |
78deda |
SEE ALSO
|
|
Packit |
78deda |
|
|
Packit |
78deda |
pnmcolormap,
|
|
Packit |
78deda |
pnmremap,
|
|
Packit |
78deda |
ppmquantall,
|
|
Packit |
78deda |
pamdepth,
|
|
Packit |
78deda |
ppmdither,
|
|
Packit |
78deda |
ppmquant,
|
|
Packit |
78deda |
pnm
|
|
Packit |
78deda |
|
|
Packit |
78deda |
|
|
Packit |
78deda |
Table Of Contents
|
|
Packit |
78deda |
|
|
Packit |
78deda |
SYNOPSIS
|
|
Packit |
78deda |
DESCRIPTION
|
|
Packit |
78deda |
HISTORY
|
|
Packit |
78deda |
SEE ALSO
|
|
Packit |
78deda |
|
|
Packit |
78deda |
</BODY>
|
|
Packit |
78deda |
</HTML>
|