57 |
|
|
58 |
|
VIEW theirview = STDVIEW; /* input view */ |
59 |
|
int gotview; /* got input view? */ |
60 |
+ |
int wrongformat = 0; /* input in another format? */ |
61 |
|
int thresolu, tvresolu; /* input resolution */ |
62 |
|
double theirexp; /* input picture exposure */ |
63 |
|
double theirs2ours[4][4]; /* transformation matrix */ |
212 |
|
fputaspect(pixaspect, stdout); |
213 |
|
if (ourexp > 0 && (ourexp < .995 || ourexp > 1.005)) |
214 |
|
fputexpos(ourexp, stdout); |
215 |
+ |
fputformat(COLRFMT, stdout); |
216 |
|
putc('\n', stdout); |
217 |
|
/* write picture */ |
218 |
|
writepicture(); |
235 |
|
{ |
236 |
|
static char *altname[] = {VIEWSTR,"rpict","rview","pinterp",NULL}; |
237 |
|
register char **an; |
238 |
+ |
char fmt[32]; |
239 |
|
|
240 |
+ |
if (isformat(s)) { |
241 |
+ |
formatval(fmt, s); |
242 |
+ |
wrongformat = strcmp(fmt, COLRFMT); |
243 |
+ |
return; |
244 |
+ |
} |
245 |
|
putc('\t', stdout); |
246 |
|
fputs(s, stdout); |
247 |
|
|
278 |
|
theirexp = 1.0; |
279 |
|
gotview = 0; |
280 |
|
printf("%s:\n", pfile); |
281 |
< |
getheader(pfp, headline); |
282 |
< |
if (!gotview || fgetresolu(&thresolu, &tvresolu, pfp) |
283 |
< |
!= (YMAJOR|YDECR)) { |
284 |
< |
fprintf(stderr, "%s: picture view error\n", pfile); |
281 |
> |
getheader(pfp, headline, NULL); |
282 |
> |
if (wrongformat || !gotview || |
283 |
> |
fgetresolu(&thresolu, &tvresolu, pfp) != (YMAJOR|YDECR)) { |
284 |
> |
|
285 |
> |
fprintf(stderr, "%s: picture format error\n", pfile); |
286 |
|
exit(1); |
287 |
|
} |
288 |
|
if (ourexp <= 0) |