1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
\
.\" 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
|