Quantizes a 24-bit image to 8-bit pseudo-color.
n_colors
Dither
Intleave
Valid strings and the corresponding interleaving methods are:
'image'
'row'
'pixel'
NOTE: If the input image is an associative array, the interleaving method is found in the interleave field of the array.
Quiet
NOTE: The original 24-bit image cannot be reconstructed from the 8-bit quantized result.
Paul Heckbert. "Color Image Quantization for Frame Buffer Display", Siggraph `82 Proceedings, pp. 297-307.
NOTE: The filename used in this example is a UNIX specific filename, which must be modified for use on other platforms.
chautauqua = IMAGE_READ(GETENV('VNI_DIR') + $ '/image-1_0/data/chautauqua24.tiff'); Read in a 24-bit image-interleaved image. chautauqua_8bit = IMAGE_COLOR_QUANT(chautauqua, 256,) ; Convert the image to 8-bit pseudo-color. IMAGE_DISPLAY, chautauqua_8bit ; Display the 8-bit image.
The data used in the example comes from the red, green, and blue images of Boulder in the PV-WAVE
data
directory.
boulder_8bit = IMAGE_COLOR_QUANT(boulder, 256, /Loadcmap); Convert the image to 8-bit pseudo-color.
TV, boulder_8bit; Display the 8-bit image.