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

Comparing ray/src/px/normtiff.c (file contents):
Revision 3.12 by greg, Sat Dec 4 00:24:43 2010 UTC vs.
Revision 3.15 by greg, Fri Jul 19 17:37:56 2019 UTC

# Line 5 | Line 5 | static const char      RCSid[] = "$Id$";
5   * Tone map SGILOG TIFF or Radiance picture and output 24-bit RGB TIFF
6   */
7  
8 #include <stdio.h>
8   #include <math.h>
10 #include <time.h>
11 #include <string.h>
9  
10 + #include "rtio.h"
11   #include "platform.h"
12   #include "tiffio.h"
13   #include "color.h"
# Line 39 | Line 37 | short  ortab[8] = {            /* orientation conversion table */
37  
38   typedef struct {
39          FILE    *fp;            /* file pointer */
40 <        char    fmt[32];        /* picture format */
40 >        char    fmt[MAXFMTLEN]; /* picture format */
41          double  pa;             /* pixel aspect ratio */
42          RESOLU  rs;             /* picture resolution */
43   } PICTURE;
# Line 55 | Line 53 | static PICTURE *openpicture(char *fname);
53   static int tmap_picture(char *fname, PICTURE *pp);
54   static int tmap_tiff(char *fname, TIFF *tp);
55   static int putimage(uint16 or, uint32 xs, uint32 ys, float xr, float yr,
56 <        uint16 ru, BYTE *pd);
56 >        uint16 ru, uby8 *pd);
57  
58  
59   int
# Line 215 | Line 213 | tmap_picture(                  /* tone map Radiance picture */
213          uint16  orient;
214          double  paspect = (pp->rs.rt & YMAJOR) ? pp->pa : 1./pp->pa;
215          int     xsiz, ysiz;
216 <        BYTE    *pix;
216 >        uby8    *pix;
217                                          /* read and tone map picture */
218          if (tmMapPicture(&pix, &xsiz, &ysiz, flags,
219                          rgbp, gamv, lddyn, ldmax, fname, pp->fp) != TM_E_OK)
# Line 244 | Line 242 | tmap_tiff(                     /* tone map SGILOG TIFF */
242          float   xres, yres;
243          uint16  orient, resunit, phot;
244          int     xsiz, ysiz;
245 <        BYTE    *pix;
245 >        uby8    *pix;
246                                          /* check to make sure it's SGILOG */
247          TIFFGetFieldDefaulted(tp, TIFFTAG_PHOTOMETRIC, &phot);
248          if ((phot == PHOTOMETRIC_LOGL) | (phot == PHOTOMETRIC_MINISBLACK))
# Line 276 | Line 274 | putimage(      /* write out our image */
274          float   xr,
275          float   yr,
276          uint16  ru,
277 <        BYTE    *pd
277 >        uby8    *pd
278   )
279   {
280          register int    y;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines