home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mega A/V
/
mega_av.zip
/
mega_av
/
GRAPHUTL
/
PBMPLUS.ZIP
/
PPMQUANT.MAN
< prev
next >
Wrap
Text File
|
1991-08-11
|
2KB
|
67 lines
ppmquant(1) Unix Programmer's Manual ppmquant(1)
NNNAAAMMMEEE
ppmquant - quantize the colors in a portable pixmap down to a specified
number
SSSYYYNNNOOOPPPSSSIIISSS
ppppppmmmqqquuuaaannnttt [-fffllloooyyyddd|-fffsss] _n_c_o_l_o_r_s [_p_p_m_f_i_l_e]
ppppppmmmqqquuuaaannnttt [-fffllloooyyyddd|-fffsss] ---mmmaaappp _m_a_p_f_i_l_e [_p_p_m_f_i_l_e]
DDDEEESSSCCCRRRIIIPPPTTTIIIOOONNN
Reads a portable pixmap as input. Chooses _n_c_o_l_o_r_s colors to best
represent the image, maps the existing colors to the new ones, and writes
a portable pixmap as output.
The quantization method is Heckbert's "median cut".
Alternately, you can skip the color-choosing step by specifying your own
set of colors with the ---mmmaaappp flag. The _m_a_p_f_i_l_e is just a _p_p_m file; it can
be any shape, all that matters is the colors in it. For instance, to
quantize down to the 8-color IBM TTL color set, you might use:
P3
8 1
255
0 0 0
255 0 0
0 255 0
0 0 255
255 255 0
255 0 255
0 255 255
255 255 255
The ---fffllloooyyyddd/-fffsss flag enables a Floyd-Steinberg error diffusion step.
Floyd-Steinberg gives vastly better results on images where the
unmodified quantization has banding or other artifacts, especially when
going to a small number of colors such as the above IBM set. However, it
does take substantially more CPU time, so the default is off.
All flags can be abbreviated to their shortest unique prefix.
RRREEEFFFEEERRREEENNNCCCEEESSS
"Color Image Quantization for Frame Buffer Display" by Paul Heckbert,
SIGGRAPH '82 Proceedings, page 297.
SSSEEEEEE AAALLLSSSOOO
pnmdepth(1), ppmquantall(1), ppm(5)
AAAUUUTTTHHHOOORRR
Copyright (C) 1989, 1991 by Jef Poskanzer.
12 January 1991 1