49 |
|
return(-1); |
50 |
|
} |
51 |
|
/* discard header */ |
52 |
< |
getheader(input, NULL); |
52 |
> |
if (checkheader(input, COLRFMT, NULL) < 0) { |
53 |
> |
fprintf(stderr, "%s: not a Radiance picture\n", fname); |
54 |
> |
return(-1); |
55 |
> |
} |
56 |
|
/* get picture dimensions */ |
57 |
|
if (fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) { |
58 |
|
fprintf(stderr, "%s: bad picture size\n", fname); |
70 |
|
fprintf(stderr, "%s: read error (y=%d)\n", fname, i); |
71 |
|
return(-1); |
72 |
|
} |
73 |
< |
normcolrs(scanline, xres); |
73 |
> |
normcolrs(scanline, xres, 0); |
74 |
|
plotscan(scanline, xres, i); |
75 |
|
} |
76 |
|
|