3to1, mcut, improve, quantize, dither - picture color compression
fb/3to1 [ -e ] colormap [ input ]
fb/mcut [ input ]
fb/improve colormap [ input ]
fb/quantize [ input ]
fb/dither [ input ]
3to1 approximates the full color (3 bytes per pixel) or mapped (1 byte
per pixel, possibly with a colormap) input picture file in one byte per
pixel using the given colormap. If no input file is named, the picture
is read from standard input. The -e option suppresses the default
Mcut writes a color map, suitable for use by 3to1 on its standard out-
put. The color map is computed using the median-cut algorithm and rep-
resents reasonably well, but not necessarily optimally, the colors of
the input picture.
Improve reads a color map and a picture and writes on standard output a
new color map that better represents the colors of the picture. Multi-
ple passes of improve may produce better and better color maps.
Quantize is an rc script that packages all of the above to compress the
full-color input image to one byte per pixel.
Dither likewise compresses full-color images to one byte per pixel. It
uses a fixed color map that allows a speedy algorithm; quantize instead
runs slower but gives better results.