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

Comparing ray/src/px/glimage.c (file contents):
Revision 1.1 by greg, Thu Jan 25 11:46:39 1990 UTC vs.
Revision 1.3 by greg, Thu Apr 18 14:35:08 1991 UTC

# Line 39 | Line 39 | char  *argv[];
39                  exit(1);
40          }
41                                  /* discard header */
42 <        getheader(input, NULL);
42 >        if (checkheader(input, COLRFMT, NULL) < 0) {
43 >                fprintf(stderr, "%s: not a Radiance picture\n", fname);
44 >                exit(1);
45 >        }
46                                  /* get picture dimensions */
47          if (fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) {
48                  fprintf(stderr, "%s: bad picture size\n", fname);
# Line 63 | Line 66 | char  *argv[];
66                          fprintf(stderr, "%s: read error (y=%d)\n", fname, i);
67                          exit(1);
68                  }
69 <                normcolrs(scanline, xres);
69 >                normcolrs(scanline, xres, 0);
70                  for (j = 0; j < xres; j++) {
71                          winout[j] = 255L<<24;
72                          winout[j] |= (long)scanline[j][BLU]<<16;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines