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

Comparing ray/src/px/ra_skel.c (file contents):
Revision 2.6 by greg, Mon Jul 12 12:41:16 1993 UTC vs.
Revision 2.9 by greg, Sun Feb 27 10:17:18 1994 UTC

# Line 74 | Line 74 | char  *argv[];
74                  exit(1);
75          }
76          if (i == argc-2 && freopen(argv[i+1], "w", stdout) == NULL) {
77 <                fprintf(stderr, "can't open output \"%s\"\n",
77 >                fprintf(stderr, "%s: can't open output \"%s\"\n",
78                                  progname, argv[i+1]);
79                  exit(1);
80          }
# Line 87 | Line 87 | char  *argv[];
87                                          /* get their image resolution */
88                  read_skel_head(&xmax, &ymax);
89                                          /* put our header */
90 +                newheader("RADIANCE", stdout);
91                  printargs(i, argv, stdout);
92                  fputformat(COLRFMT, stdout);
93                  putchar('\n');
# Line 134 | Line 135 | skel2ra()              /* convert 24-bit scanlines to Radiance pic
135                  quiterr("out of memory in skel2ra");
136                                                  /* convert image */
137          for (y = ymax-1; y >= 0; y--) {
138 <                scanout[x][RED] = getc(stdin);
139 <                scanout[x][GRN] = getc(stdin);
140 <                scanout[x][BLU] = getc(stdin);
141 <                if (feof(stdin) || ferror(stdin))
138 >                for (x = 0; x < xmax; x++) {
139 >                        scanout[x][RED] = getc(stdin);
140 >                        scanout[x][GRN] = getc(stdin);
141 >                        scanout[x][BLU] = getc(stdin);
142 >                }
143 >                if (feof(stdin) | ferror(stdin))
144                          quiterr("error reading skel image");
145                                                  /* undo gamma */
146                  gambs_colrs(scanout, xmax);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines