Quantize Image - Quantize a 24 bit image to 256 colors or less.
Name
Quantize Image - Quantize a 24 bit image to 256 colors or less.
Summary
Name Quantize Image
Type Filter
Inputs Image - field 2D 4-vector byte REQUIRED
Outputs Palette - colormap
Parameters
Name Type Default Choices
Max Colors idial 16 1 256
Description
Convert an image with 24 bits/pixel to 256 or fewer colors.
This is done with something resembling the Heckbert mean cut
algorithm.
Inputs
Image - field 2D 4-vector byte
Each pixel is a single byte which is an index into the
resulting colormap.
Parameters
Max Colors (idial)
Outputs
Palette - colormap
Example networks
To see what an image would look like with fewer colors:
read image
|
+-----------------------+
| |
display image quantize image
| |
| |
colorizer
|
|
display image
Related modules
write gif
write pcx
See also