color2ascii

[ XITE Reference Manual | XITE home ]

Name

color2ascii - dump a colortable in ascii format

Syntax

 color2ascii [<option>...] <image-file> <ascii-file>

Description

Writes the colortable contents to ascii-file, in ascii format. Use "-" or "-1" for output to stdout.

The ascii output can be given as input to mct(1). For details on the output format, refer to PrintColortable(3).

On a visual with composite colormaps (DirectColor or TrueColor visual), one part of the pixelvalue is used as an index into the colormap which controls the amount of red, one part is used as an index into the green colormap and one part for the blue colormap.

On a visual with non-composite colormap (e.g. PseudoColor visual), only one of these parts is used as an index into the single colormap.

When the contents of a colortable stored in a file in BIFF format is printed, only the PseudoColor part of the pixelvalue is shown because the file only stores this part of the pixel-value.

Options

-hex
Print pixel value as hexademical number (default decimal)

See also

color2ascii(3), mct(1), PrintColortable(3), colorquant(1), makepseudo(1)

Author

Svein Bøe, BLAB, Ifi, UiO

Id

$Id: color2ascii.c,v 1.13 1996/11/29 15:14:06 svein Exp $

Examples

 color2ascii -o mona.txt mona.col