72 char *
infname = NULL, * outfname = NULL;
76 unsigned char **
scan, *outscan[4];
80 if (
scanargs( argc, argv,
"% t%- o%-outfile!s infile%s",
81 &tflag, &oflag, &outfname, &infname ) == 0 )
92 fprintf( stderr,
"%s: %s is already black & white\n",
93 cmd_name( argv ), infname ? infname :
"stdin" );
98 fprintf( stderr,
"%s: %s is not RGB",
99 cmd_name( argv ), infname ? infname :
"stdin" );
115 outscan[0] = scan[-1];
120 outscan[2] = outscan[3] =
buffer;
#define RLE_SET_BIT(glob, bit)
void rle_row_free(rle_hdr *the_hdr, rle_pixel **scanp)
int scanargs(int argc, char **argv, const char *format,...)
int rle_row_alloc(rle_hdr *the_hdr, rle_pixel ***scanp)
void rle_putrow(rle_pixel *rows[], int rowlen, rle_hdr *the_hdr)
void rle_addhist(char *argv[], rle_hdr *in_hdr, rle_hdr *out_hdr)
void rgb_to_bw(rle_pixel *red_row, rle_pixel *green_row, rle_pixel *blue_row, rle_pixel *bw_row, int rowlen)
void rle_puteof(rle_hdr *the_hdr)
int rle_get_setup(rle_hdr *the_hdr)
int rle_get_error(int code, const char *pgmname, const char *fname)
FILE * rle_open_f(const char *prog_name, const char *f_name, const char *mode)
void rle_put_setup(rle_hdr *the_hdr)
char * cmd_name(char **argv)
int rle_getrow(rle_hdr *the_hdr, rle_pixel *scanline[])