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

Comparing ray/src/px/ra_xyze.c (file contents):
Revision 2.5 by gwlarson, Tue Oct 27 09:08:27 1998 UTC vs.
Revision 2.6 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 RGBE and XYZE formats
6 + *  Added white-balance adjustment 10/01 (GW).
7   */
8  
9   #include  <stdio.h>
10 + #include  <string.h>
11   #include  <math.h>
12 + #include  <time.h>
13   #include  "color.h"
14   #include  "resolu.h"
15  
# Line 17 | Line 17 | static char SCCSid[] = "$SunId$ SGI";
17   #include  <fcntl.h>
18   #endif
19  
20 extern char  *malloc(), *strcpy();
21
20   int  rgbinp = -1;                       /* input is RGBE? */
21  
22   int  rgbout = 0;                        /* output should be RGBE? */
# Line 159 | Line 157 | convert()                              /* convert to XYZE or RGBE picture */
157                                                  /* compute transform */
158          if (rgbout) {
159                  if (rgbinp) {                   /* RGBE -> RGBE */
160 <                        comprgb2rgbmat(xfm, inprims, outprims);
160 >                        comprgb2rgbWBmat(xfm, inprims, outprims);
161                  } else {                        /* XYZE -> RGBE */
162 <                        compxyz2rgbmat(xfm, outprims);
162 >                        compxyz2rgbWBmat(xfm, outprims);
163                          ourexp *= WHTEFFICACY;
164                  }
165          } else {
166                  if (rgbinp) {                   /* RGBE -> XYZE */
167 <                        comprgb2xyzmat(xfm, inprims);
167 >                        comprgb2xyzWBmat(xfm, inprims);
168                          ourexp /= WHTEFFICACY;
169                  } else {                        /* XYZE -> XYZE */
170                          for (y = 0; y < 3; y++)
# Line 217 | Line 215 | convert()                              /* convert to XYZE or RGBE picture */
215                          quiterr("error writing output picture");
216          }
217                                                  /* free scanline */
218 <        free((char *)scanin);
218 >        free((void *)scanin);
219          if (scanout != NULL)
220 <                free((char *)scanout);
220 >                free((void *)scanout);
221   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines