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

Comparing ray/src/px/ra_t16.c (file contents):
Revision 1.1 by greg, Thu Feb 2 10:49:36 1989 UTC vs.
Revision 1.2 by greg, Wed May 31 17:27:18 1989 UTC

# Line 259 | Line 259 | struct hdStruct  *hp;
259                          register unsigned char  *dp;
260                          dp = (unsigned char *)tarData + i*3*hp->x;
261                          for (j = 0; j < hp->x; j++) {
262 <                                setcolor(scanline[j], gmap[dp[0]],
262 >                                setcolor(scanline[j], gmap[dp[2]],
263                                                  gmap[dp[1]],
264 <                                                gmap[dp[2]]);
264 >                                                gmap[dp[0]]);
265                                  dp += 3;
266                          }
267                  }
# Line 308 | Line 308 | struct hdStruct  *hp;
308                          register unsigned char  *dp;
309                          dp = (unsigned char *)tarData + j*3*hp->x;
310                          for (i = 0; i < hp->x; i++) {
311 <                                c = 1024.*colval(inline[i],RED);
311 >                                c = 1024.*colval(inline[i],BLU);
312                                  if (c > 1023) c = 1023;
313                                  *dp++ = gmap[c];
314                                  c = 1024.*colval(inline[i],GRN);
315                                  if (c > 1023) c = 1023;
316                                  *dp++ = gmap[c];
317 <                                c = 1024.*colval(inline[i],BLU);
317 >                                c = 1024.*colval(inline[i],RED);
318                                  if (c > 1023) c = 1023;
319                                  *dp++ = gmap[c];
320                          }
# Line 379 | Line 379 | FILE  *fp;
379                          goto readerr;
380                  cnt = (c & 0x7f) + 1;
381                  if (c & 0x80) {                 /* repeated pixel */
382 <                        r = getc(fp); g = getc(fp);
383 <                        if ((b = getc(fp)) == EOF)
382 >                        b = getc(fp); g = getc(fp);
383 >                        if ((r = getc(fp)) == EOF)
384                                  goto readerr;
385                          while (cnt--) {
386                                *dp++ = r;
387                                *dp++ = g;
386                                  *dp++ = b;
387 +                                *dp++ = g;
388 +                                *dp++ = r;
389                          }
390                  } else                          /* non-repeating pixels */
391                          while (cnt--) {
392                                  *dp++ = getc(fp); *dp++ = getc(fp);
393 <                                if ((b = getc(fp)) == EOF)
393 >                                if ((r = getc(fp)) == EOF)
394                                          goto readerr;
395 <                                *dp++ = b;
395 >                                *dp++ = r;
396                          }
397          }
398          return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines