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

Comparing ray/src/px/ra_ppm.c (file contents):
Revision 2.12 by schorsch, Sun Mar 28 20:33:14 2004 UTC vs.
Revision 2.13 by greg, Fri Jan 6 06:40:53 2006 UTC

# Line 220 | Line 220 | ppm2ra(                /* convert 1-byte Pixmap to Radiance picture
220  
221  
222   static void
223 < ra2ppm( /* convert Radiance picture to Pixmap */
223 > ra2ppm( /* convert Radiance picture to 1-byte/sample Pixmap */
224          int  binary,
225          int  grey
226   )
# Line 585 | Line 585 | getby2(                        /* return 2-byte quantity from fp */
585   {
586          register int    lowerb, upperb;
587  
588        lowerb = getc(fp);
588          upperb = getc(fp);
589 +        lowerb = getc(fp);
590          if (upperb == EOF)
591                  return(EOF);
592          return(upperb<<8 | lowerb);
# Line 599 | Line 599 | putby2(                        /* put 2-byte quantity to fp */
599          register FILE   *fp
600   )
601   {
602        putc(w & 0xff, fp);
602          putc(w>>8 & 0xff, fp);
603 +        putc(w & 0xff, fp);
604          if (ferror(fp)) {
605                  fprintf(stderr, "%s: write error on PPM output\n", progname);
606                  exit(1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines