85 |
|
if (fixfrac > FTINY) what2do |= DO_FIXHIST; |
86 |
|
else what2do &= ~DO_FIXHIST; |
87 |
|
break; |
88 |
+ |
case 'I': |
89 |
+ |
bool(DO_PREHIST); |
90 |
+ |
break; |
91 |
|
case 'l': |
92 |
|
bool(DO_LINEAR); |
93 |
|
break; |
140 |
|
default: |
141 |
|
goto userr; |
142 |
|
} |
143 |
+ |
if ((what2do & (DO_FIXHIST|DO_PREHIST)) == (DO_FIXHIST|DO_PREHIST)) { |
144 |
+ |
fprintf(stderr, "%s: only one of -i or -I option\n", progname); |
145 |
+ |
exit(1); |
146 |
+ |
} |
147 |
|
if ((mbcalfile != NULL) + (cwarpfile != NULL) + |
148 |
|
(outprims != stdprims) > 1) { |
149 |
|
fprintf(stderr, |
171 |
|
printargs(argc, argv, stdout); /* add to output header */ |
172 |
|
if (mbcalfile == NULL & outprims != stdprims) |
173 |
|
fputprims(outprims, stdout); |
174 |
< |
getfovimg(); /* get foveal sample image */ |
175 |
< |
if (what2do&DO_FIXHIST) /* get fixation history? */ |
174 |
> |
if ((what2do & (DO_PREHIST|DO_VEIL|DO_ACUITY)) != DO_PREHIST) |
175 |
> |
getfovimg(); /* get foveal sample image? */ |
176 |
> |
if (what2do&DO_PREHIST) /* get histogram? */ |
177 |
> |
gethisto(stdin); |
178 |
> |
else if (what2do&DO_FIXHIST) /* get fixation history? */ |
179 |
|
getfixations(stdin); |
180 |
|
mapimage(); /* map the picture */ |
181 |
|
if (mapfp != NULL) /* write out basic mapping */ |
182 |
|
putmapping(mapfp); |
183 |
|
exit(0); |
184 |
|
userr: |
185 |
< |
fprintf(stderr, "Usage: %s [-{h|a|v|s|c|l|w}[+-]][-i ffrac][-e ev][-p xr yr xg yg xb yb xw yw|-f mbf.cal|-m rgb.cwp][-u Ldmax][-d Lddyn][-x mapfile] inpic [outpic]\n", |
185 |
> |
fprintf(stderr, "Usage: %s [-{h|a|v|s|c|l|w}[+-]][-I|-i ffrac][-e ev][-p xr yr xg yg xb yb xw yw|-f mbf.cal|-m rgb.cwp][-u Ldmax][-d Lddyn][-x mapfile] inpic [outpic]\n", |
186 |
|
progname); |
187 |
|
exit(1); |
188 |
|
#undef bool |
208 |
|
if (!strcmp(fmt,COLRFMT)) lumf = rgblum; |
209 |
|
else if (!strcmp(fmt,CIEFMT)) lumf = cielum; |
210 |
|
else lumf = NULL; |
211 |
< |
return; /* don't echo */ |
211 |
> |
return(0); /* don't echo */ |
212 |
|
} |
213 |
|
if (isprims(s)) { /* get input primaries */ |
214 |
|
primsval(inprimS, s); |
215 |
|
inprims= inprimS; |
216 |
< |
return; /* don't echo */ |
216 |
> |
return(0); /* don't echo */ |
217 |
|
} |
218 |
|
if (isexpos(s)) { /* picture exposure */ |
219 |
|
inpexp *= exposval(s); |
220 |
< |
return; /* don't echo */ |
220 |
> |
return(0); /* don't echo */ |
221 |
|
} |
222 |
|
if (isaspect(s)) /* pixel aspect ratio */ |
223 |
|
pixaspect *= aspectval(s); |
224 |
|
if (isview(s)) /* image view */ |
225 |
|
gotview += sscanview(&ourview, s); |
226 |
< |
fputs(s, stdout); |
226 |
> |
return(fputs(s, stdout)); |
227 |
|
} |
228 |
|
|
229 |
|
|