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

Comparing ray/src/px/x11image.c (file contents):
Revision 2.33 by greg, Thu Nov 4 12:04:55 1993 UTC vs.
Revision 2.34 by greg, Mon Nov 15 10:55:33 1993 UTC

# Line 672 | Line 672 | XKeyPressedEvent  *ekey;
672          case '@':                               /* adaptation level */
673                  if (avgbox(cval) == -1)
674                          return(-1);
675 <                comp = com=='@'
676 <                ? 106./pow(1.219+pow(luminance(cval)/exposure,.4),2.5)/exposure
677 <                : .5/bright(cval) ;
675 >                comp = bright(cval);
676 >                if (comp < 1e-20) {
677 >                        XBell(thedisplay, 0);
678 >                        return(-1);
679 >                }
680 >                if (com == '@')
681 >                        comp = 106./exposure/
682 >                        pow(1.219+pow(comp*WHTEFFICACY/exposure,.4),2.5);
683 >                else
684 >                        comp = .5/comp;
685                  comp = log(comp)/.69315 - scale;
686                  n = comp < 0 ? comp-.5 : comp+.5 ;      /* round */
687                  if (n == 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines