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

Comparing ray/src/px/ra_avs.c (file contents):
Revision 2.4 by greg, Mon Jul 12 12:41:13 1993 UTC vs.
Revision 2.6 by greg, Thu Nov 18 09:55:29 1993 UTC

# Line 65 | Line 65 | char  *argv[];
65                  exit(1);
66          }
67          if (i == argc-2 && freopen(argv[i+1], "w", stdout) == NULL) {
68 <                fprintf(stderr, "can't open output \"%s\"\n",
68 >                fprintf(stderr, "%s: can't open output \"%s\"\n",
69                                  progname, argv[i+1]);
70                  exit(1);
71          }
# Line 127 | Line 127 | avs2ra()               /* convert 24-bit scanlines to Radiance pict
127                  quiterr("out of memory in avs2ra");
128                                                  /* convert image */
129          for (y = ymax-1; y >= 0; y--) {
130 <                (void)getc(stdin);                      /* toss alpha */
131 <                scanout[x][RED] = getc(stdin);
132 <                scanout[x][GRN] = getc(stdin);
133 <                scanout[x][BLU] = getc(stdin);
134 <                if (feof(stdin) || ferror(stdin))
130 >                for (x = 0; x < xmax; x++) {
131 >                        (void)getc(stdin);                      /* toss alpha */
132 >                        scanout[x][RED] = getc(stdin);
133 >                        scanout[x][GRN] = getc(stdin);
134 >                        scanout[x][BLU] = getc(stdin);
135 >                }
136 >                if (feof(stdin) | ferror(stdin))
137                          quiterr("error reading AVS image");
138                                                  /* undo gamma */
139                  gambs_colrs(scanout, xmax);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines