68 |
|
/* put header */ |
69 |
|
printargs(argc, argv, rafp); |
70 |
|
putc('\n', rafp); |
71 |
< |
fprintf(rafp, "-Y %d +X %d\n", ymax, xmax); |
71 |
> |
fputresolu(YMAJOR|YDECR, xmax, ymax, rafp); |
72 |
|
/* convert file */ |
73 |
|
bn2ra(); |
74 |
|
} else { |
83 |
|
} |
84 |
|
/* get header */ |
85 |
|
getheader(rafp, NULL); |
86 |
< |
if (fscanf(rafp, "-Y %d +X %d\n", &ymax, &xmax) != 2) |
86 |
> |
if (fgetresolu(&xmax, &ymax, rafp) != (YMAJOR|YDECR)) |
87 |
|
quiterr("bad RADIANCE format"); |
88 |
|
if (openbarney(argv[i+1], "w") < 0) { |
89 |
|
sprintf(errmsg, "cannot open output \"%s\"", argv[i+1]); |