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 2.2 by greg, Sat Feb 22 02:07:27 2003 UTC

# Line 1 | Line 1
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
4
5 /* Copyright (c) 1986 Regents of the University of California */
6
4   /*
5   *  glimage.c - program to dump pixel file NeWS window
6   *
# Line 14 | Line 11 | static char SCCSid[] = "$SunId$ LBL";
11  
12   #include  <gl.h>
13  
14 + #include  <time.h>
15 +
16   #include  "color.h"
17  
18 + #include  "resolu.h"
19  
20 +
21   main(argc, argv)                                /* print a picture */
22   int  argc;
23   char  *argv[];
# Line 39 | Line 40 | char  *argv[];
40                  exit(1);
41          }
42                                  /* discard header */
43 <        getheader(input, NULL);
43 >        if (checkheader(input, COLRFMT, NULL) < 0) {
44 >                fprintf(stderr, "%s: not a Radiance picture\n", fname);
45 >                exit(1);
46 >        }
47                                  /* get picture dimensions */
48 <        if (fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) {
48 >        if (fgetresolu(&xres, &yres, input) < 0) {
49                  fprintf(stderr, "%s: bad picture size\n", fname);
50                  exit(1);
51          }
# Line 63 | Line 67 | char  *argv[];
67                          fprintf(stderr, "%s: read error (y=%d)\n", fname, i);
68                          exit(1);
69                  }
70 <                normcolrs(scanline, xres);
70 >                normcolrs(scanline, xres, 0);
71                  for (j = 0; j < xres; j++) {
72                          winout[j] = 255L<<24;
73                          winout[j] |= (long)scanline[j][BLU]<<16;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines