#include "stdio.h"
#include "image.h"
#include "rle.h"
Go to the source code of this file.
|
| main (int argc, char **argv) |
|
| stoc (unsigned short *sptr, unsigned char *cptr, int n) |
|
main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 37 of file iristorle.c.
44 unsigned char *
rows[3];
45 char *
infname = NULL, *outfname = NULL;
47 if (
scanargs( argc, argv,
"% o%-outfile.rle!s, infile.rgb!s\n\
48 (Convert SGI image in infile.rgb to URT RLE image in outfile.rle.)",
49 &i, &outfname, &infname ) == 0 )
53 image=iopen(infname,
"r");
55 fprintf(stderr,
"%s: can't open input file %s\n",
cmd_name(argv),infname);
69 rows[0] = (
unsigned char *)
malloc(xsize*
sizeof(
unsigned char));
70 rows[1] = (
unsigned char *)
malloc(xsize*
sizeof(
unsigned char));
71 rows[2] = (
unsigned char *)
malloc(xsize*
sizeof(
unsigned char));
88 for(y=0; y<
ysize; y++) {
90 getrow(image,
rbuf,y,0);
95 getrow(image,
rbuf,y,0);
96 getrow(image,
gbuf,y,1);
97 getrow(image,
bbuf,y,2);
#define RLE_SET_BIT(glob, bit)
int scanargs(int argc, char **argv, const char *format,...)
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 rle_puteof(rle_hdr *the_hdr)
stoc(unsigned short *sptr, unsigned char *cptr, int n)
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
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)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)
stoc |
( |
unsigned short * |
sptr, |
|
|
unsigned char * |
cptr, |
|
|
int |
n |
|
) |
| |