69 |
|
} |
70 |
|
/* put header */ |
71 |
|
printargs(i, argv, rafp); |
72 |
+ |
fputformat(COLRFMT, rafp); |
73 |
|
putc('\n', rafp); |
74 |
|
fputresolu(YMAJOR|YDECR, xmax, ymax, rafp); |
75 |
|
/* convert file */ |
85 |
|
quiterr(errmsg); |
86 |
|
} |
87 |
|
/* get header */ |
88 |
< |
getheader(rafp, NULL); |
89 |
< |
if (fgetresolu(&xmax, &ymax, rafp) != (YMAJOR|YDECR)) |
88 |
> |
if (checkheader(rafp, COLRFMT, NULL) < 0 || |
89 |
> |
fgetresolu(&xmax, &ymax, rafp) != (YMAJOR|YDECR)) |
90 |
|
quiterr("bad RADIANCE format"); |
91 |
|
if (openbarney(argv[i+1], "w") < 0) { |
92 |
|
sprintf(errmsg, "cannot open output \"%s\"", argv[i+1]); |