42 |
|
|
43 |
|
int nowarn = 0; /* no warning messages? */ |
44 |
|
|
45 |
+ |
int original = 0; /* origninal values? */ |
46 |
+ |
|
47 |
|
int xres=0, yres=0; /* picture resolution */ |
48 |
|
|
49 |
|
int xpos, ypos; /* picture position */ |
52 |
|
tputs(s) /* put out string preceded by a tab */ |
53 |
|
char *s; |
54 |
|
{ |
55 |
+ |
double d; |
56 |
+ |
COLOR ctmp; |
57 |
+ |
/* echo header line */ |
58 |
|
putchar('\t'); |
59 |
|
fputs(s, stdout); |
60 |
+ |
if (!original) |
61 |
+ |
return; |
62 |
+ |
/* check for exposure */ |
63 |
+ |
if (isexpos(s)) { |
64 |
+ |
d = 1.0/exposval(s); |
65 |
+ |
scalecolor(input[nfiles].coef, d); |
66 |
+ |
} else if (iscolcor(s)) { |
67 |
+ |
colcorval(ctmp, s); |
68 |
+ |
colval(input[nfiles].coef,RED) /= colval(ctmp,RED); |
69 |
+ |
colval(input[nfiles].coef,GRN) /= colval(ctmp,GRN); |
70 |
+ |
colval(input[nfiles].coef,BLU) /= colval(ctmp,BLU); |
71 |
+ |
} |
72 |
|
} |
73 |
|
|
74 |
|
|
101 |
|
case 'w': |
102 |
|
nowarn = !nowarn; |
103 |
|
break; |
104 |
+ |
case 'o': |
105 |
+ |
original = !original; |
106 |
+ |
break; |
107 |
|
case 'f': |
108 |
|
fcompile(argv[++a]); |
109 |
|
break; |
179 |
|
usage: |
180 |
|
eputs("Usage: "); |
181 |
|
eputs(argv[0]); |
182 |
< |
eputs(" [-w][-x xr][-y yr][-e expr][-f file] [ [-s f][-c r g b] picture ..]\n"); |
182 |
> |
eputs( |
183 |
> |
" [-w][-h][-x xr][-y yr][-e expr][-f file] [ [-s f][-c r g b] pic ..]\n"); |
184 |
|
quit(1); |
185 |
|
} |
186 |
|
|
218 |
|
} |
219 |
|
varset(vypos, (double)ypos); |
220 |
|
for (xpos = 0; xpos < xres; xpos++) { |
221 |
+ |
for (i = 0; i < nfiles; i++) |
222 |
+ |
multcolor(input[i].scan[xpos],input[i].coef); |
223 |
|
varset(vxpos, (double)xpos); |
224 |
|
eclock++; |
225 |
|
if (brtdef != NULL) { |
235 |
|
colval(scanout[xpos],j) = 0.0; |
236 |
|
for (i = 0; i < nfiles; i++) |
237 |
|
colval(scanout[xpos],j) += |
215 |
– |
colval(input[i].coef,j) * |
238 |
|
colval(input[i].scan[xpos],j); |
239 |
|
} |
240 |
|
if (colval(scanout[xpos],j) < 0.0) |