Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ppmcscale(1)

ppm(5)

ppmquant(1)  —  USER COMMANDS

NAME

ppmquant - quantize the colors in a portable pixmap down to a specified number

SYNOPSIS

ppmquant [-floyd|-fs] <ncolors> [ppmfile]

DESCRIPTION

Reads a portable pixmap as input.  Chooses <ncolors> 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". 

The -floyd flag adds a Floyd-Steinberg error diffusion step.  This may give better results on images where the unmodified quantization has banding or other artifacts.  It takes maybe 20% more CPU time. 

All flags can be abbreviated to their shortest unique prefix. 

REFERENCES

"Color Image Quantization for Frame Buffer Display" by Paul Heckbert, SIGGRAPH ’82 Proceedings, page 297. 

SEE ALSO

ppmcscale(1), ppm(5)

AUTHOR

Copyright (C) 1989 by Jef Poskanzer. 
 
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.  This software is provided "as is" without express or implied warranty.

Amiga Unix  —  Last change: 18 May 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026