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

Comparing ray/src/px/ra_pr.c (file contents):
Revision 2.3 by greg, Fri Oct 2 16:25:33 1992 UTC vs.
Revision 2.4 by greg, Fri Oct 30 09:08:31 1992 UTC

# Line 41 | Line 41 | extern char    *ecalloc(), *emalloc();
41  
42   extern long  ftell();
43  
44 < double  gamma = 2.2;                    /* gamma correction */
44 > double  gamcor = 2.2;                   /* gamma correction */
45  
46   int  bradj = 0;                         /* brightness adjustment */
47  
# Line 77 | Line 77 | char  *argv[];
77                                  dither = !dither;
78                                  break;
79                          case 'g':
80 <                                gamma = atof(argv[++i]);
80 >                                gamcor = atof(argv[++i]);
81                                  break;
82                          case 'b':
83                                  greyscale = !greyscale;
# Line 258 | Line 258 | struct rasterfile  *h;
258                                          /* convert table */
259          for (i = 0; i < h->ras_maplength/3; i++)
260                  setcolr(ctab[i],
261 <                                pow((cmap[0][i]+.5)/256.,gamma),
262 <                                pow((cmap[1][i]+.5)/256.,gamma),
263 <                                pow((cmap[2][i]+.5)/256.,gamma));
261 >                                pow((cmap[0][i]+.5)/256.,gamcor),
262 >                                pow((cmap[1][i]+.5)/256.,gamcor),
263 >                                pow((cmap[2][i]+.5)/256.,gamcor));
264          if (bradj)
265                  shiftcolrs(ctab, 256, bradj);
266                                          /* convert file */
# Line 361 | Line 361 | colormap  map;
361          register int  i, val;
362  
363          for (i = 0; i < 256; i++) {
364 <                val = pow((i+0.5)/256.0, 1.0/gamma) * 256.0;
364 >                val = pow((i+0.5)/256.0, 1.0/gamcor) * 256.0;
365                  map[0][i] = map[1][i] = map[2][i] = val;
366          }
367   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines