46 |
|
|
47 |
|
int xres, yres; /* resolution of input */ |
48 |
|
double inpaspect = 1.0; /* pixel aspect ratio of input */ |
49 |
+ |
int correctaspect = 0; /* aspect ratio correction? */ |
50 |
|
|
51 |
|
int xrad; /* x window size */ |
52 |
|
int yrad; /* y window size */ |
104 |
|
} else |
105 |
|
nrows = atoi(argv[i]); |
106 |
|
break; |
107 |
+ |
case 'c': |
108 |
+ |
correctaspect = !correctaspect; |
109 |
+ |
break; |
110 |
|
case 'p': |
111 |
|
i++; |
112 |
|
outaspect = atof(argv[i]); |
285 |
|
fprintf(stderr, "%s: warning - partial frame (%d%%)\n", |
286 |
|
progname, 100*i/yres); |
287 |
|
yres = i; |
288 |
+ |
y_r = (double)nrows/yres; |
289 |
|
break; |
290 |
|
} |
291 |
|
pass1scan(scan, i); |
372 |
|
quit(1); |
373 |
|
} |
374 |
|
/* record pixel aspect and exposure */ |
375 |
< |
d = x_c / y_r; |
376 |
< |
if (d < .99 || d > 1.01) |
377 |
< |
fputaspect(d, stdout); |
375 |
> |
if (!correctaspect) { |
376 |
> |
d = x_c / y_r; |
377 |
> |
if (d < .99 || d > 1.01) |
378 |
> |
fputaspect(d, stdout); |
379 |
> |
} |
380 |
|
d = bright(exposure); |
381 |
|
if (d < .995 || d > 1.005) |
382 |
|
fputexpos(d, stdout); |