1Pnmquant User Manual(0) Pnmquant User Manual(0)
2
3
4
6 pnmquant - quantize the colors in a Netpbm image to a smaller set
7
8
10 pnmquant [-center|-meancolor|-meanpixel] [-floyd|-fs] [-nofloyd|-nofs]
11 [-spreadbrightness|-spreadluminosity] ncolors [pnmfile]
12
13 All options can be abbreviated to their shortest unique prefix. You
14 may use two hyphens instead of one to designate an option. You may use
15 either white space or equals signs between an option name and its
16 value.
17
18
19
21 This program is part of Netpbm(1).
22
23 pnmquant reads a PNM image as input. It chooses ncolors colors to best
24 represent the image, maps the existing colors to the new ones, and
25 writes a PNM image as output.
26
27 This program is simply a combination of pnmcolormap and pnmremap, where
28 the colors of the input are remapped using a color map which is gener‐
29 ated from the colors in that same input. The options have the same
30 meaning as in those programs. See their documentation to understand
31 pnmquant.
32
33 It is much faster to call pnmcolormap and pnmremap directly than to run
34 pnmquant. You save the overhead of the Perl interpreter and creating
35 two extra processes. pnmquant is just a convenience.
36
37 Here is an example of the relationship between the programs:
38
39 This:
40
41 $ pnmquant 256 myimage.pnm >/tmp/colormap.pnm >myimage256.pnm
42
43 does essentially this:
44
45 $ pnmcolormap 256 myimage.pnm >/tmp/colormap.pnm
46 $ pnmremap -mapfile=/tmp/colormap.pnm myimage.pnm >myimage256.pnm
47
48 pnmquant did not exist before Netpbm 9.21 (January 2001). Before that,
49 ppmquant did the same thing, but only on PPM images. ppmquant contin‐
50 ues to exist, but is only a front end (for name compatibility) to
51 pnmquant.
52
53
55 pnmcolormap(1), pnmremap(1), ppmquantall(1), pamdepth(1), ppmdither(1),
56 ppmquant(1), pnm(1)
57
59 This manual page was generated by the Netpbm tool 'makeman' from HTML
60 source. The master documentation is at
61
62 http://netpbm.sourceforge.net/doc/pnmquant.html
63
64netpbm documentation 09 April 2013 Pnmquant User Manual(0)