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.9 by greg, Sat Oct 20 11:49:02 1990 UTC vs.
Revision 1.11 by greg, Thu Apr 18 14:35:42 1991 UTC

# Line 96 | Line 96 | char  *argv[];
96                          quiterr("incompatible format");
97                                          /* put header */
98                  printargs(i, argv, stdout);
99 +                fputformat(COLRFMT, stdout);
100                  putchar('\n');
101                  fputresolu(YMAJOR|YDECR, head.x, head.y, stdout);
102                                          /* convert file */
103                  tg2ra(&head);
104          } else {
105 <                getheader(stdin, NULL);
106 <                if (fgetresolu(&head.x, &head.y, stdin) != (YMAJOR|YDECR))
105 >                if (checkheader(stdin, COLRFMT, NULL) < 0 ||
106 >                        fgetresolu(&head.x, &head.y, stdin) != (YMAJOR|YDECR))
107                          quiterr("bad picture file");
108                                          /* assign header */
109                  head.textSize = 0;
# Line 300 | Line 301 | struct hdStruct  *hp;
301                          register unsigned char  *dp;
302                          dp = (unsigned char *)tarData + j*3*hp->x;
303                          for (i = 0; i < hp->x; i++) {
303                                *dp++ = inl[i][RED];
304                                *dp++ = inl[i][GRN];
304                                  *dp++ = inl[i][BLU];
305 +                                *dp++ = inl[i][GRN];
306 +                                *dp++ = inl[i][RED];
307                          }
308                  }
309          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines