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.5 by greg, Wed Feb 28 11:39:09 1990 UTC vs.
Revision 1.7 by greg, Wed Nov 7 13:10:30 1990 UTC

# Line 11 | Line 11 | static char SCCSid[] = "$SunId$ LBL";
11   */
12  
13   #include <stdio.h>
14 #include <rasterfile.h>
14  
15   #include "random.h"
16   #include "color.h"
# Line 145 | Line 144 | compgamma()                            /* compute gamma correction map */
144          register int  i, val;
145  
146          for (i = 0; i < 256; i++) {
147 <                val = pow(i/256.0, 1.0/GAMMA) * 256.0;
147 >                val = pow((i+0.5)/256.0, 1.0/GAMMA) * 256.0;
148                  if (val > 248) val = 248;
149                  gammamap[i] = val;
150          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines