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

Comparing ray/src/px/ximage.c (file contents):
Revision 1.29 by greg, Thu Apr 18 14:35:52 1991 UTC vs.
Revision 1.31 by greg, Mon May 6 15:19:03 1991 UTC

# Line 379 | Line 379 | XKeyEvent  *ekey;
379                          sprintf(buf, "%.3f", intens(cval)/exposure);
380                          break;
381                  case 'l':                               /* luminance */
382 <                        sprintf(buf, "%.0fn", luminance(cval)/exposure);
382 >                        sprintf(buf, "%.0fL", luminance(cval)/exposure);
383                          break;
384                  case 'c':                               /* color */
385                          comp = pow(2.0, (double)scale);
# Line 548 | Line 548 | getmono()                      /* get monochrome data */
548   {
549          register unsigned short *dp;
550          register int    x, err;
551 <        int     y;
551 >        int     y, errp;
552          rgbpixel        *inl;
553          short   *cerr;
554  
# Line 562 | Line 562 | getmono()                      /* get monochrome data */
562                  for (x = 0; x < xmax; x++) {
563                          if (!(x&0xf))
564                                  *++dp = 0;
565 +                        errp = err;
566                          err += rgb_bright(&inl[x]) + cerr[x];
567                          if (err > 127)
568                                  err -= 255;
569                          else
570                                  *dp |= 1<<(x&0xf);
571 <                        cerr[x] = err >>= 1;
571 >                        err /= 3;
572 >                        cerr[x] = err + errp;
573                  }
574          }
575          free((char *)inl);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines