63 "% a%- h%-hdrsize!d o%-outfile!s xsize!d ysize!d files!*s\n(\
64 \tConvert one or more raw images to an RLE image.\n\
65 \t-a\tFirst input file is alpha channel. Normally first is red.\n\
66 \t-h\tSpecify number of bytes to discard from input header.\n\
67 \txsize ysize\tSize of input images.\n\
68 \tTry rawtorle for more complex situations.)",
84 inpfil = (FILE **)malloc(
sizeof( FILE * ) * files );
85 for ( i=0; i<files; i++ )
88 if ( inpfil[i] == stdin )
93 "%s: Can't use standard input for more than one file\n",
103 if ( hflag && (hsize > 0) )
105 trash = (
char *)malloc( hsize );
107 for ( i=0; i<files; i++ )
108 fread( trash, 1, hsize, inpfil[i] );
124 out_hdr
.xmax = xsize - 1;
125 out_hdr
.ymax = ysize - 1;
127 for ( i = -aflag; i<out_hdr
.ncolors; i++)
134 fprintf(stderr,
"%s: Ran out of heap space!!\n",
141 for ( row=0; row<ysize; row++)
143 for ( i = -aflag; i<files-aflag; i++ )
144 fread( outrow[i], 1, xsize, inpfil[i+aflag] );
FILE * rle_open_f(char *prog_name, char *file_name, char *mode)
#define RLE_SET_BIT(glob, bit)
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
char * cmd_name(char **argv)
void main(int argc, char **argv)
int rle_row_alloc(rle_hdr *the_hdr, rle_pixel ***scanp)
int scanargs(int argc, char **argv, const char *format,...)
void rle_puteof(rle_hdr *the_hdr)
void rle_putrow(rows, int rowlen, rle_hdr *the_hdr)
void rle_addhist(argv, rle_hdr *in_hdr, rle_hdr *out_hdr)
void rle_put_setup(rle_hdr *the_hdr)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)