12 #include <brlcad/fb.h>
15 #define MAX_PIXELS 1024
29 unsigned char *rows[4];
37 while( argv[0][0] ==
'-') {
39 switch( argv[0][1] ) {
50 rle_names( &hdr, hdr.cmd, rle_file );
53 fprintf(stderr,
"getfb: Error reading setup information\n");
59 fprintf( stderr,
"Image bounds\n\tmin %d %d\n\tmax %d %d\n",
63 fprintf( stderr,
"Alpha Channel present\n");
75 if( (fbp = fb_open(
"", hdr.xmax+1, hdr.ymax+1 )) == NULL )
79 rows[0] = (
unsigned char *)-1;
80 rows[1] = scanline[1];
81 rows[2] = scanline[2];
82 rows[3] = scanline[3];
85 for ( j = 0; j < x_len; j++)
87 pix[j][RED] = scanline[1][j];
88 pix[j][GRN] = scanline[2][j];
89 pix[j][BLU] = scanline[3][j];
91 fb_write( fbp, hdr.xmin, i, pix, x_len );
FILE * rle_open_f(char *prog_name, char *file_name, char *mode)
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
void rle_debug(int on_off)
char * cmd_name(char **argv)
void main(int argc, char **argv)
int rle_get_setup(rle_hdr *the_hdr)
int rle_getrow(rle_hdr *the_hdr, scanline)
#define RLE_CLR_BIT(glob, bit)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)