--- ray/src/px/paintjet.c 1989/10/20 20:36:13 1.3 +++ ray/src/px/paintjet.c 1991/04/18 14:35:13 1.5 @@ -48,7 +48,10 @@ char *fname; return(-1); } /* discard header */ - getheader(input, NULL); + if (checkheader(input, COLRFMT, NULL) < 0) { + fprintf(stderr, "%s: not a Radiance picture\n", fname); + return(-1); + } /* get picture dimensions */ if (fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) { fprintf(stderr, "%s: bad picture size\n", fname); @@ -67,7 +70,7 @@ char *fname; for (i = yres-1; i >= 0; i--) { if (freadcolrs(scanline, xres, input) < 0) return(-1); - normcolrs(scanline, xres); + normcolrs(scanline, xres, 0); plotscan(scanline, xres, i); }