rgb2c.1 2.7 KB
.TH rgb2c 1P local "Silicon Graphics, Inc."
.SH NAME
rgb2c \- .rgb file converter to C data structure
.SH SYNOPSIS
\f3rgb2c\f1 [-m name] [-f fmt] [-o output] [-s bits] [-t citype] [-l r,g,b] [-h r,g,b] [-F] [-P] [-Q] [-S smask] [-X] [-b] [-r] infile.rgb
.SH DESCRIPTION
.I rgb2c\^
reads an SGI RGB image file and generates a C data structure to standard
output.  The input image can have from 1 to 4 planes.
A 1 plane input file is assumed to be intensity only.
A 2 plane input file is assumed to be intensity/alpha.
A 3 plane input file is treated as RGB, and a 4 plane
input file is treated as RGBA. 
.PP
The currently supported output formats are Intensity (4/8 bit),
Intensity/Alpha (4/8/16 bit), and RGBA (16/32 bit).
Any other specified combination of type and bit size will be mapped to one of
the above choices.
.PP
Command line options are:
.RS 5
.TP 12
.B \-m name
Name of the C data structure.  Defaults to "texture".
.TP
.B \-f fmt
Specify the format of the output.  Choices are I, IA, and RGBA.
.TP
.B \-o output
Specify format of output text.
Choices are C for .c output,
MIP for mip-mapped .c output,
MIPSUPPLIED for mip-mapped .c output with the different levels supplied,,
or RAW for raw ASCII format.
When using MIPSUPPLIED the texture files should be named:  name0.rgb, name1.rgb,
name2.rgb, etc where name0.rgb is the top level image and each successive image is
exactly half the size (in x and y) of the preceding one.
.TP
.B \-s bits
Specifies the bit size of the output data. Choices are 4, 8, 16, 32.
.TP
.B \-t citype
Specifies the color Index type. Choices are C and I.
.TP
.B \-l r,g,b
Specify the low colors for interpolation.  Defaults to 0, 0, 0.
.TP
.B \-h r,g,b
Specify the high colors for interpolation.  Defaults to 255, 255, 255.
.TP
.B \-F
Flip image verticially.
.TP
.B \-P
Toggle padding of texel rows for use with
.IR gDPLoadBlock (3P).
(The default is padding on.)
.TP
.B \-Q
Quadricate (replicate each entry four times) the lookup table that is output
for CI type textures.
This option is used when
loading TLUTs using the load_block command (as is done for
version 1 of the hardware).
.TP
.B \-S smask
Swap 32-bit words on odd lines, toggling bit
.I smask
in texels.
.TP
.B \-X
Add extra padding to make all declared objects a multiple of 32 bytes long.
.TP
.B \-b
Toggle shifting each tile by 0.5.  This is neccessary when mip map levels
are supplied (output type MIPSUPPLIED) when the shift has been performed 
when the lower levels were filtered.  Ususlly don't use this option.
.TP
.B \-r
Don't include the raw data.  This can be used when the output type is MIP or
MIPSUPPLIED to avoid including extraneous data which will eat memory space.  Do
not use this option with C output.
.SH "SEE ALSO"
.TP 10
.IR flt2c (1P)