57 long int rows_per_strip;
59 char *outfname = NULL, *
infname = NULL;
64 error(
"tiff_sample and rle_pixel not same size");
66 if (
scanargs( argc, argv,
"% Cc%- f%- o!-outfile.tiff!s infile.rle%s\n(\
67 \tConvert URT image to 24-bit TIFF image.\n\
68 \t-c\tUse LZW compression (default)\n\
69 \t-C\tUse no compression\n\
70 \t-f\tDon't flip image top to bottom\n\
71 \t-o outfile.tiff is required)",
72 &cflag, &
flip, &i, &outfname, &infname ) == 0 )
77 else if ( cflag == 2 )
94 tif = TIFFOpen(outfname,
"w");
95 if (!
tif)
error(
"tiffopen ret null");
105 rows_per_strip = (long)8*1024/(
in_hdr.
xmax+1);
106 if (rows_per_strip < 1) rows_per_strip = 1L;
107 SETFIELD(
tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip);
static rle_pixel ** scan_green
static tiff_sample * RGBscanline
int scanargs(int argc, char **argv, const char *format,...)
void get_tiff_scanline(tiff_sample *buf, int row)
static unsigned short compression
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
static rle_pixel ** scan_blue
#define SETFIELD(tif, fieldname, arg)
static rle_pixel ** scan_red
unsigned char tiff_sample
#define RLE_CLR_BIT(glob, bit)
FILE * rle_open_f(const char *prog_name, const char *f_name, const char *mode)
void error(const char *s)
char * cmd_name(char **argv)
void rle_get_setup_ok(rle_hdr *the_hdr, const char *prog_name, const char *file_name)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)