color2ascii
[ XITE Reference Manual | XITE home ]
Name
color2ascii - write a biff band to an ascii data file
Syntax
#include <xite/color.h>
int color2ascii( Color_cell* coltab, int len,
char* filename, char* type, int hex );
Description
color2ascii dumps the contents of coltab with length
len as ascii data to the file filename. The format can
be read by mct(1). Give filename "-" or "-1" for writing
to stdout.
For information on the output format, see PrintColortable(3).
Parameters
-
len
- This is the length of the colortable, i.e. the number of
entries to be printed.
-
hex
- If nonzero, print pixelvalue as hexadecimal numbers, instead
of decimal numbers.
-
type
- This may be one of the following
-
w
- Truncate or create file for writing
-
a
- Append. Open for writing at end of file, or create for writing.
Return value
0 - ok
1 - could not open file
2 - bad 'type' argument, should be "w" or "a"
See also
color2ascii(1), mct(1), PrintColortable(3), colorquant(1),
makepseudo(1)
Author
Svein Bøe
Id
$Id: color2ascii.c,v 1.13 1996/11/29 15:14:06 svein Exp $