129 |
|
progname); |
130 |
|
quit(1); |
131 |
|
} |
132 |
< |
printf("-Y %d +X %d\n", yres, xres); /* resolution */ |
132 |
> |
fputresolu(YMAJOR|YDECR, xres, yres, stdout); |
133 |
|
valtopix(); |
134 |
|
} else { |
135 |
|
/* get header */ |
136 |
|
getheader(fin, checkhead); |
137 |
|
|
138 |
|
if (xres <= 0 || yres <= 0) /* get picture size */ |
139 |
< |
if (fscanf(fin, "-Y %d +X %d\n", &yres, &xres) != 2) { |
139 |
> |
if (fgetresolu(&xres, &yres, fin) != (YMAJOR|YDECR)) { |
140 |
|
fprintf(stderr, |
141 |
|
"%s: missing x and y resolution\n", |
142 |
|
progname); |
158 |
|
{ |
159 |
|
if (header) |
160 |
|
fputs(line, stdout); |
161 |
< |
if (!strncmp(line, "EXPOSURE=", 9)) |
162 |
< |
exposure *= atof(line+9); |
161 |
> |
if (isexpos(line)) |
162 |
> |
exposure *= exposval(line); |
163 |
|
} |
164 |
|
|
165 |
|
|