46 int out_alpha = 0, cur_out_alpha, uniq = 0, first;
50 if (
scanargs( argc, argv,
"% a%- u%- infile%s",
51 &out_alpha, &uniq, &infname ) == 0 )
69 cur_out_alpha = in_hdr.
alpha && out_alpha ;
71 for ( j = in_hdr.
ymin; j <= in_hdr.
ymax ; j++ )
75 for ( i = in_hdr.
xmin; i <= in_hdr.
xmax; i++ )
79 for ( chan = -cur_out_alpha;
82 if ( rows0[chan][i] != prev[chan] )
88 for ( chan = 0; chan < in_hdr.
ncolors; chan++ )
90 printf(
"%d ", rows0[chan][i] );
91 prev[chan] = rows0[chan][
i];
102 prev -= in_hdr.
alpha;
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_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
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)
char * cmd_name(char **argv)
int rle_getrow(rle_hdr *the_hdr, rle_pixel *scanline[])
#define RLE_CHECK_ALLOC(pgm, ptr, name)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)