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.19 by gwlarson, Wed Jun 2 10:57:53 1999 UTC vs.
Revision 2.20 by greg, Sat Feb 22 02:07:28 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1997 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  Program to convert between RADIANCE and TIFF files.
6 < *  Added experimental LogLuv encodings 7/97 (GWL).
6 > *  Added LogLuv encodings 7/97 (GWL).
7 > *  Added white-balance adjustment 10/01 (GW).
8   */
9  
10   #include  <stdio.h>
11   #include  <math.h>
12 + #include  <time.h>
13   #include  "tiffio.h"
14   #include  "color.h"
15   #include  "resolu.h"
16  
17   #define  GAMCOR         2.2             /* default gamma */
18  
20 #ifndef malloc
21 extern char  *malloc();
22 #endif
19                                  /* conversion flags */
20   #define C_CXFM          0x1             /* needs color transformation */
21   #define C_GAMUT         0x2             /* needs gamut mapping */
# Line 268 | Line 264 | initfromtif()          /* initialize conversion from TIFF inpu
264                  SET(C_GAMMA);
265                  setcolrgam(cvts.gamcor);
266                  if (CHK(C_XYZE)) {
267 <                        comprgb2xyzmat(cvts.cmat,
267 >                        comprgb2xyzWBmat(cvts.cmat,
268                                          CHK(C_PRIM) ? cvts.prims : stdprims);
269                          SET(C_CXFM);
270                  }
# Line 425 | Line 421 | initfromrad()                  /* initialize input from a Radiance pi
421                  SET(C_RFLT|C_TFLT);
422                  CLR(C_GRY);
423                  if (!CHK(C_XYZE)) {
424 <                        cpcolormat(cvts.cmat, rgb2xyzmat);
424 >                        comprgb2xyzWBmat(cvts.cmat,
425 >                                        CHK(C_PRIM) ? cvts.prims : stdprims);
426                          SET(C_CXFM);
427                  }
428                  if (cvts.comp != COMPRESSION_SGILOG &&
# Line 448 | Line 445 | initfromrad()                  /* initialize input from a Radiance pi
445                  CLR(C_GRY);
446                  setcolrgam(cvts.gamcor);
447                  if (CHK(C_XYZE)) {
448 <                        compxyz2rgbmat(cvts.cmat,
448 >                        compxyz2rgbWBmat(cvts.cmat,
449                                          CHK(C_PRIM) ? cvts.prims : stdprims);
450                          SET(C_CXFM);
451                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines