#include <stdio.h>
#include <brlcad/fb.h>
#include "rle.h"
Go to the source code of this file.
main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 17 of file getfb.c.
29 unsigned char *
rows[4];
37 while( argv[0][0] ==
'-') {
39 switch( argv[0][1] ) {
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");
69 for (i = 3; i < hdr.
ncolors; i++)
75 if( (fbp = fb_open(
"", hdr.
xmax+1, hdr.
ymax+1 )) == NULL )
78 for ( i = hdr.
ymin; i <= hdr.
ymax; i++) {
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 );
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
int rle_get_setup(rle_hdr *the_hdr)
#define RLE_CLR_BIT(glob, bit)
void rle_debug(int on_off)
FILE * rle_open_f(const char *prog_name, const char *f_name, const char *mode)
char * cmd_name(char **argv)
unsigned char scanline[4][1280]
int rle_getrow(rle_hdr *the_hdr, rle_pixel *scanline[])
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)