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 2.32 by greg, Fri Aug 19 02:31:32 2005 UTC vs.
Revision 2.36 by greg, Fri Jul 19 17:37:56 2019 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7   *  Added white-balance adjustment 10/01 (GW).
8   */
9  
10 #include  <stdio.h>
10   #include  <math.h>
11   #include  <ctype.h>
13 #include  <time.h>
14 #include  <string.h>
12  
13 + #include  "rtio.h"
14 + #include  "platform.h"
15   #include  "tiffio.h"
16   #include  "color.h"
17   #include  "resolu.h"
# Line 191 | Line 190 | doneopts:
190          exit(0);
191   userr:
192          fprintf(stderr,
193 <        "Usage: %s [-z|-L|-l|-f|-w][-b][-e +/-stops][-g gamma] {in.pic|-} out.tif\n",
193 >        "Usage: %s [-z|-L|-l|-f|-w][-b][-e +/-stops][-g gamma] {in.hdr|-} out.tif\n",
194                          progname);
195          fprintf(stderr,
196 <        "   Or: %s -r [-x][-e +/-stops][-g gamma] in.tif [out.pic|-]\n",
196 >        "   Or: %s -r [-x][-e +/-stops][-g gamma] in.tif [out.hdr|-]\n",
197                          progname);
198          exit(1);
199   }
# Line 415 | Line 414 | tiff2ra(               /* convert TIFF image to Radiance picture */
414                  cvts.rfp = stdout;
415          else if ((cvts.rfp = fopen(av[ac+1], "w")) == NULL)
416                  quiterr("cannot open Radiance output picture");
417 +        SET_FILE_BINARY(cvts.rfp);
418                                          /* start output header */
419          newheader("RADIANCE", cvts.rfp);
420          printargs(ac, av, cvts.rfp);
# Line 440 | Line 440 | headline(                      /* process Radiance input header line */
440   {
441          static int      tmstrlen = 0;
442          static int      ownstrlen = 0;
443 <        char    fmt[32];
443 >        char    fmt[MAXFMTLEN];
444  
445          if (!tmstrlen)
446                  tmstrlen = strlen(TMSTR);
# Line 634 | Line 634 | ra2tiff(               /* convert Radiance picture to TIFF image */
634                  cvts.rfp = stdin;
635          else if ((cvts.rfp = fopen(av[ac], "r")) == NULL)
636                  quiterr("cannot open Radiance input picture");
637 +        SET_FILE_BINARY(cvts.rfp);
638                                                  /* open TIFF file */
639          if ((cvts.tif = TIFFOpen(av[ac+1], "w")) == NULL)
640                  quiterr("cannot open TIFF output");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines