Next: plan94, Previous: pit, Up: Internal Routines [Contents][Index]
pixelsto8bit, raw, pixels8bit, colormap
Interprets raw
as raw pixel values suitable for the
current visual (i.e., suitable for display through tvraw
), and
returns an 8-bit equivalent (in pixels8bit
) and the
associated colormap (in colormap
). If the image contains
at most 256 distinct colors, then the combination of the two output
parameters is fully equivalent to the input image. If the image
contains more than 256 distinct colors, then 256 distinct colors are
selected from it at random, and each of the other colors from the
image are represented in the output by the nearest of the 256 chosen
colors. The colormap has 3 by 256 elements, for the red, green, and
blue color values.
The pixels8bit
and colormap
can be passed to
gigwrite
.
See also: colorstogrey, gifwrite, show_visuals, tvraw