ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/ra_tiff.c
(Generate patch)

Comparing ray/src/px/ra_tiff.c (file contents):
Revision 1.3 by greg, Thu Aug 15 14:04:21 1991 UTC vs.
Revision 1.4 by greg, Thu Aug 15 14:48:55 1991 UTC

# Line 18 | Line 18 | extern double  atof();
18  
19   extern char  *malloc(), *realloc();
20  
21 + int  lzcomp = 0;                        /* use Lempel-Ziv compression? */
22 +
23   double  gamma = 2.2;                    /* gamma correction */
24  
25   int  bradj = 0;                         /* brightness adjustment */
# Line 40 | Line 42 | char  *argv[];
42                          case 'g':
43                                  gamma = atof(argv[++i]);
44                                  break;
45 +                        case 'z':
46 +                                lzcomp = !lzcomp;
47 +                                break;
48                          case 'e':
49                                  if (argv[i+1][0] != '+' && argv[i+1][0] != '-')
50                                          goto userr;
# Line 71 | Line 76 | doneopts:
76  
77          exit(0);
78   userr:
79 <        fprintf(stderr, "Usage: %s [-r][-e +/-stops] input output\n",
79 >        fprintf(stderr,
80 >                "Usage: %s [-r][-z][-e +/-stops][-g gamma] input output\n",
81                          progname);
82          exit(1);
83   }
# Line 194 | Line 200 | char   *inpf, *outf;
200          TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
201          TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, 2);
202          TIFFSetField(tif, TIFFTAG_PLANARCONFIG, 1);
203 +        if (lzcomp)
204 +                TIFFSetField(tif, TIFFTAG_COMPRESSION, (unsigned short)5);
205                                                  /* allocate scanlines */
206          scanin = (COLR *)malloc(xmax*sizeof(COLR));
207          scanout = (BYTE *)malloc(TIFFScanlineSize(tif));

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines