--- ray/src/px/ra_tiff.c 1991/08/15 15:47:35 1.5 +++ ray/src/px/ra_tiff.c 1993/07/12 12:41:18 2.4 @@ -10,19 +10,22 @@ static char SCCSid[] = "$SunId$ LBL"; #include +#include + #include "tiffio.h" #include "color.h" -extern double atof(); +#include "resolu.h" + extern char *malloc(), *realloc(); int lzcomp = 0; /* use Lempel-Ziv compression? */ int greyscale = 0; /* produce greyscale image? */ -double gamma = 2.2; /* gamma correction */ +double gamcor = 2.2; /* gamma correction */ int bradj = 0; /* brightness adjustment */ @@ -42,7 +45,7 @@ char *argv[]; if (argv[i][0] == '-') switch (argv[i][1]) { case 'g': - gamma = atof(argv[++i]); + gamcor = atof(argv[++i]); break; case 'z': lzcomp = !lzcomp; @@ -66,7 +69,7 @@ char *argv[]; else break; doneopts: - setcolrgam(gamma); + setcolrgam(gamcor); if (reverse) if (i != argc-2 && i != argc-1) @@ -142,7 +145,7 @@ char *inpf, *outf; fputs(" -r\n", stdout); fputformat(COLRFMT, stdout); putchar('\n'); - fputresolu(YDECR|YMAJOR, xmax, ymax, stdout); + fprtresolu(xmax, ymax, stdout); /* convert image */ if (nsamps == 1) pconfig = 1; @@ -204,7 +207,7 @@ char *inpf, *outf; if (strcmp(inpf, "-") && freopen(inpf, "r", stdin) == NULL) quiterr("cannot open Radiance input file"); if (checkheader(stdin, COLRFMT, NULL) < 0 || - fgetresolu(&xmax, &ymax, stdin) != (YDECR|YMAJOR)) + fgetresolu(&xmax, &ymax, stdin) < 0) quiterr("bad Radiance picture"); /* open TIFF file */ if ((tif = TIFFOpen(outf, "w")) == NULL)