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

Comparing ray/src/px/panim.c (file contents):
Revision 1.6 by greg, Thu Apr 5 13:58:45 1990 UTC vs.
Revision 2.2 by greg, Sat Feb 22 02:07:27 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1988 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  Send pictures to PC animation system.
6   *
# Line 103 | Line 100 | char   *file;
100          }
101                                                  /* get dimensions */
102          getheader(fp, NULL);
103 +        if (checkheader(fp, COLRFMT, NULL) < 0) {
104 +                fputs(file, stderr);
105 +                fputs(": not a Radiance picture\n", stderr);
106 +                exit(1);
107 +        }
108          if (fgetresolu(&xres, &yres, fp) != (YMAJOR|YDECR) ||
109                          xres > SCANLINE || yres > NUMSCANS) {
110                  fputs(file, stderr);
# Line 144 | Line 146 | compgamma()                            /* compute gamma correction map */
146          register int  i, val;
147  
148          for (i = 0; i < 256; i++) {
149 <                val = pow(i/256.0, 1.0/GAMMA) * 256.0;
149 >                val = pow((i+0.5)/256.0, 1.0/GAMMA) * 256.0;
150                  if (val > 248) val = 248;
151                  gammamap[i] = val;
152          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines