1 |
< |
/* Copyright (c) 1986 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
10 |
|
* 4/23/86 |
11 |
|
*/ |
12 |
|
|
13 |
< |
#include <stdio.h> |
13 |
> |
#include "standard.h" |
14 |
|
|
15 |
|
#include "color.h" |
16 |
|
|
17 |
< |
#define min(a,b) ((a)<(b)?(a):(b)) |
17 |
> |
#include "resolu.h" |
18 |
|
|
19 |
< |
int xres = 0; /* resolution of input */ |
20 |
< |
int yres = 0; |
19 |
> |
#define min(a,b) ((a)<(b)?(a):(b)) |
20 |
|
|
21 |
+ |
RESOLU picres; /* resolution of picture */ |
22 |
+ |
|
23 |
|
int uniq = 0; /* print only unique values? */ |
24 |
|
|
25 |
< |
int original = 0; /* convert back to original values? */ |
25 |
> |
int doexposure = 0; /* exposure change? (>100 to print) */ |
26 |
|
|
27 |
|
int dataonly = 0; /* data only format? */ |
28 |
|
|
33 |
|
int format = 'a'; /* input/output format */ |
34 |
|
char *fmtid = "ascii"; /* format identifier for header */ |
35 |
|
|
36 |
< |
int header = 1; /* do header */ |
36 |
> |
int header = 1; /* do header? */ |
37 |
|
|
38 |
+ |
int resolution = 1; /* put/get resolution string? */ |
39 |
+ |
|
40 |
+ |
int original = 0; /* convert to original values? */ |
41 |
+ |
|
42 |
|
int wrongformat = 0; /* wrong input format? */ |
43 |
|
|
44 |
+ |
double gamcor = 1.0; /* gamma correction */ |
45 |
+ |
|
46 |
+ |
int ord[3] = {RED, GRN, BLU}; /* RGB ordering */ |
47 |
+ |
int rord[4]; /* reverse ordering */ |
48 |
+ |
|
49 |
|
COLOR exposure = WHTCOLOR; |
50 |
|
|
51 |
|
char *progname; |
59 |
|
int argc; |
60 |
|
char **argv; |
61 |
|
{ |
52 |
– |
extern double atof(); |
62 |
|
extern int checkhead(); |
63 |
+ |
double d, expval = 1.0; |
64 |
|
int i; |
65 |
|
|
66 |
|
progname = argv[0]; |
67 |
|
|
68 |
|
for (i = 1; i < argc; i++) |
69 |
< |
if (argv[i][0] == '-') |
69 |
> |
if (argv[i][0] == '-' || argv[i][0] == '+') |
70 |
|
switch (argv[i][1]) { |
71 |
< |
case 'h': /* no header */ |
72 |
< |
header = 0; |
71 |
> |
case 'h': /* header */ |
72 |
> |
header = argv[i][0] == '+'; |
73 |
|
break; |
74 |
+ |
case 'H': /* resolution string */ |
75 |
+ |
resolution = argv[i][0] == '+'; |
76 |
+ |
break; |
77 |
|
case 'u': /* unique values */ |
78 |
< |
uniq = 1; |
78 |
> |
uniq = argv[i][0] == '-'; |
79 |
|
break; |
80 |
|
case 'o': /* original values */ |
81 |
< |
original = 1; |
81 |
> |
original = argv[i][0] == '-'; |
82 |
|
break; |
83 |
+ |
case 'g': /* gamma correction */ |
84 |
+ |
gamcor = atof(argv[i+1]); |
85 |
+ |
if (argv[i][0] == '+') |
86 |
+ |
gamcor = 1.0/gamcor; |
87 |
+ |
i++; |
88 |
+ |
break; |
89 |
+ |
case 'e': /* exposure correction */ |
90 |
+ |
d = atof(argv[i+1]); |
91 |
+ |
if (argv[i+1][0] == '-' || argv[i+1][0] == '+') |
92 |
+ |
d = pow(2.0, d); |
93 |
+ |
if (argv[i][0] == '-') |
94 |
+ |
expval *= d; |
95 |
+ |
scalecolor(exposure, d); |
96 |
+ |
doexposure++; |
97 |
+ |
i++; |
98 |
+ |
break; |
99 |
+ |
case 'R': /* reverse byte sequence */ |
100 |
+ |
if (argv[i][0] == '-') { |
101 |
+ |
ord[0]=BLU; ord[1]=GRN; ord[2]=RED; |
102 |
+ |
} else { |
103 |
+ |
ord[0]=RED; ord[1]=GRN; ord[2]=BLU; |
104 |
+ |
} |
105 |
+ |
break; |
106 |
|
case 'r': /* reverse conversion */ |
107 |
< |
reverse = 1; |
107 |
> |
reverse = argv[i][0] == '-'; |
108 |
|
break; |
109 |
|
case 'b': /* brightness values */ |
110 |
< |
brightonly = 1; |
110 |
> |
brightonly = argv[i][0] == '-'; |
111 |
|
break; |
112 |
|
case 'd': /* data only (no indices) */ |
113 |
< |
dataonly = 1; |
113 |
> |
dataonly = argv[i][0] == '-'; |
114 |
|
switch (argv[i][2]) { |
115 |
|
case '\0': |
116 |
|
case 'a': /* ascii */ |
122 |
|
fmtid = "ascii"; |
123 |
|
break; |
124 |
|
case 'b': /* byte */ |
125 |
+ |
dataonly = 1; |
126 |
|
format = 'b'; |
127 |
|
fmtid = "byte"; |
128 |
|
break; |
129 |
|
case 'f': /* float */ |
130 |
+ |
dataonly = 1; |
131 |
|
format = 'f'; |
132 |
|
fmtid = "float"; |
133 |
|
break; |
134 |
|
case 'd': /* double */ |
135 |
+ |
dataonly = 1; |
136 |
|
format = 'd'; |
137 |
|
fmtid = "double"; |
138 |
|
break; |
141 |
|
} |
142 |
|
break; |
143 |
|
case 'x': /* x resolution */ |
144 |
< |
xres = atoi(argv[++i]); |
144 |
> |
case 'X': /* x resolution */ |
145 |
> |
resolution = 0; |
146 |
> |
if (argv[i][0] == '-') |
147 |
> |
picres.or |= XDECR; |
148 |
> |
picres.xr = atoi(argv[++i]); |
149 |
|
break; |
150 |
|
case 'y': /* y resolution */ |
151 |
< |
yres = atoi(argv[++i]); |
151 |
> |
case 'Y': /* y resolution */ |
152 |
> |
resolution = 0; |
153 |
> |
if (argv[i][0] == '-') |
154 |
> |
picres.or |= YDECR; |
155 |
> |
if (picres.xr == 0) |
156 |
> |
picres.or |= YMAJOR; |
157 |
> |
picres.yr = atoi(argv[++i]); |
158 |
|
break; |
159 |
|
default: |
160 |
|
unkopt: |
171 |
|
fmtid = "8-bit_grey"; |
172 |
|
else |
173 |
|
fmtid = "24-bit_rgb"; |
174 |
< |
|
174 |
> |
/* assign reverse ordering */ |
175 |
> |
rord[ord[0]] = 0; |
176 |
> |
rord[ord[1]] = 1; |
177 |
> |
rord[ord[2]] = 2; |
178 |
> |
/* get input */ |
179 |
|
if (i == argc) { |
180 |
|
fin = stdin; |
181 |
|
} else if (i == argc-1) { |
192 |
|
set_io(); |
193 |
|
|
194 |
|
if (reverse) { |
195 |
< |
if (yres <= 0 || xres <= 0) { |
196 |
< |
fprintf(stderr, "%s: missing x and y resolution\n", |
197 |
< |
progname); |
198 |
< |
quit(1); |
199 |
< |
} |
195 |
> |
#ifdef MSDOS |
196 |
> |
setmode(fileno(stdout), O_BINARY); |
197 |
> |
if (format != 'a' && format != 'i') |
198 |
> |
setmode(fileno(fin), O_BINARY); |
199 |
> |
#endif |
200 |
|
/* get header */ |
201 |
< |
if (header && checkheader(fin, fmtid, stdout) < 0) { |
202 |
< |
fprintf(stderr, "%s: wrong input format\n", progname); |
201 |
> |
if (header) { |
202 |
> |
if (checkheader(fin, fmtid, stdout) < 0) { |
203 |
> |
fprintf(stderr, "%s: wrong input format\n", |
204 |
> |
progname); |
205 |
> |
quit(1); |
206 |
> |
} |
207 |
> |
} else |
208 |
> |
newheader("RADIANCE", stdout); |
209 |
> |
/* get resolution */ |
210 |
> |
if ((resolution && !fgetsresolu(&picres, fin)) || |
211 |
> |
picres.xr <= 0 || picres.yr <= 0) { |
212 |
> |
fprintf(stderr, "%s: missing resolution\n", progname); |
213 |
|
quit(1); |
214 |
|
} |
215 |
|
/* add to header */ |
216 |
|
printargs(i, argv, stdout); |
217 |
+ |
if (expval < .99 || expval > 1.01) |
218 |
+ |
fputexpos(expval, stdout); |
219 |
|
fputformat(COLRFMT, stdout); |
220 |
< |
printf("\n"); |
221 |
< |
fputresolu(YMAJOR|YDECR, xres, yres, stdout); |
220 |
> |
putchar('\n'); |
221 |
> |
fputsresolu(&picres, stdout); /* always put resolution */ |
222 |
|
valtopix(); |
223 |
|
} else { |
224 |
+ |
#ifdef MSDOS |
225 |
+ |
setmode(fileno(fin), O_BINARY); |
226 |
+ |
if (format != 'a' && format != 'i') |
227 |
+ |
setmode(fileno(stdout), O_BINARY); |
228 |
+ |
#endif |
229 |
|
/* get header */ |
230 |
|
getheader(fin, checkhead, NULL); |
231 |
|
if (wrongformat) { |
233 |
|
progname); |
234 |
|
quit(1); |
235 |
|
} |
236 |
< |
|
237 |
< |
if (xres <= 0 || yres <= 0) /* get picture size */ |
238 |
< |
if (fgetresolu(&xres, &yres, fin) != (YMAJOR|YDECR)) { |
239 |
< |
fprintf(stderr, |
170 |
< |
"%s: missing x and y resolution\n", |
171 |
< |
progname); |
172 |
< |
quit(1); |
173 |
< |
} |
236 |
> |
if (!fgetsresolu(&picres, fin)) { |
237 |
> |
fprintf(stderr, "%s: missing resolution\n", progname); |
238 |
> |
quit(1); |
239 |
> |
} |
240 |
|
if (header) { |
241 |
|
printargs(i, argv, stdout); |
242 |
+ |
if (expval < .99 || expval > 1.01) |
243 |
+ |
fputexpos(expval, stdout); |
244 |
|
fputformat(fmtid, stdout); |
245 |
< |
printf("\n"); |
245 |
> |
putchar('\n'); |
246 |
|
} |
247 |
+ |
if (resolution) /* put resolution */ |
248 |
+ |
fputsresolu(&picres, stdout); |
249 |
|
pixtoval(); |
250 |
|
} |
251 |
|
|
260 |
|
double d; |
261 |
|
COLOR ctmp; |
262 |
|
|
263 |
< |
if (isformat(line)) { |
194 |
< |
formatval(fmt, line); |
263 |
> |
if (formatval(fmt, line)) |
264 |
|
wrongformat = strcmp(fmt, COLRFMT); |
265 |
< |
} else if (original && isexpos(line)) { |
265 |
> |
else if (original && isexpos(line)) { |
266 |
|
d = 1.0/exposval(line); |
267 |
|
scalecolor(exposure, d); |
268 |
+ |
doexposure++; |
269 |
|
} else if (original && iscolcor(line)) { |
270 |
|
colcorval(ctmp, line); |
271 |
< |
colval(exposure,RED) /= colval(ctmp,RED); |
272 |
< |
colval(exposure,GRN) /= colval(ctmp,GRN); |
273 |
< |
colval(exposure,BLU) /= colval(ctmp,BLU); |
271 |
> |
setcolor(exposure, colval(exposure,RED)/colval(ctmp,RED), |
272 |
> |
colval(exposure,GRN)/colval(ctmp,GRN), |
273 |
> |
colval(exposure,BLU)/colval(ctmp,BLU)); |
274 |
> |
doexposure++; |
275 |
|
} else if (header) |
276 |
|
fputs(line, stdout); |
277 |
|
} |
279 |
|
|
280 |
|
pixtoval() /* convert picture to values */ |
281 |
|
{ |
282 |
< |
COLOR *scanln; |
282 |
> |
register COLOR *scanln; |
283 |
> |
int dogamma; |
284 |
|
COLOR lastc; |
285 |
+ |
FLOAT hv[2]; |
286 |
|
int y; |
287 |
|
register int x; |
288 |
|
|
289 |
< |
scanln = (COLOR *)malloc(xres*sizeof(COLOR)); |
289 |
> |
scanln = (COLOR *)malloc(scanlen(&picres)*sizeof(COLOR)); |
290 |
|
if (scanln == NULL) { |
291 |
|
fprintf(stderr, "%s: out of memory\n", progname); |
292 |
|
quit(1); |
293 |
|
} |
294 |
+ |
dogamma = gamcor < .95 || gamcor > 1.05; |
295 |
|
setcolor(lastc, 0.0, 0.0, 0.0); |
296 |
< |
for (y = yres-1; y >= 0; y--) { |
297 |
< |
if (freadscan(scanln, xres, fin) < 0) { |
296 |
> |
for (y = 0; y < numscans(&picres); y++) { |
297 |
> |
if (freadscan(scanln, scanlen(&picres), fin) < 0) { |
298 |
|
fprintf(stderr, "%s: read error\n", progname); |
299 |
|
quit(1); |
300 |
|
} |
301 |
< |
for (x = 0; x < xres; x++) { |
301 |
> |
for (x = 0; x < scanlen(&picres); x++) { |
302 |
|
if (uniq) |
303 |
< |
if ( scanln[x][RED] == lastc[RED] && |
304 |
< |
scanln[x][GRN] == lastc[GRN] && |
305 |
< |
scanln[x][BLU] == lastc[BLU] ) |
303 |
> |
if ( colval(scanln[x],RED) == |
304 |
> |
colval(lastc,RED) && |
305 |
> |
colval(scanln[x],GRN) == |
306 |
> |
colval(lastc,GRN) && |
307 |
> |
colval(scanln[x],BLU) == |
308 |
> |
colval(lastc,BLU) ) |
309 |
|
continue; |
310 |
|
else |
311 |
|
copycolor(lastc, scanln[x]); |
312 |
< |
if (original) |
312 |
> |
if (doexposure) |
313 |
|
multcolor(scanln[x], exposure); |
314 |
< |
if (!dataonly) |
315 |
< |
printf("%7d %7d ", x, y); |
314 |
> |
if (dogamma) |
315 |
> |
setcolor(scanln[x], |
316 |
> |
pow(colval(scanln[x],RED), 1.0/gamcor), |
317 |
> |
pow(colval(scanln[x],GRN), 1.0/gamcor), |
318 |
> |
pow(colval(scanln[x],BLU), 1.0/gamcor)); |
319 |
> |
if (!dataonly) { |
320 |
> |
pix2loc(hv, &picres, x, y); |
321 |
> |
printf("%7d %7d ", (int)(hv[0]*picres.xr), |
322 |
> |
(int)(hv[1]*picres.yr)); |
323 |
> |
} |
324 |
|
if ((*putval)(scanln[x], stdout) < 0) { |
325 |
|
fprintf(stderr, "%s: write error\n", progname); |
326 |
|
quit(1); |
333 |
|
|
334 |
|
valtopix() /* convert values to a pixel file */ |
335 |
|
{ |
336 |
< |
COLOR *scanln; |
336 |
> |
int dogamma; |
337 |
> |
register COLOR *scanln; |
338 |
|
int y; |
339 |
|
register int x; |
340 |
|
|
341 |
< |
scanln = (COLOR *)malloc(xres*sizeof(COLOR)); |
341 |
> |
scanln = (COLOR *)malloc(scanlen(&picres)*sizeof(COLOR)); |
342 |
|
if (scanln == NULL) { |
343 |
|
fprintf(stderr, "%s: out of memory\n", progname); |
344 |
|
quit(1); |
345 |
|
} |
346 |
< |
for (y = yres-1; y >= 0; y--) { |
347 |
< |
for (x = 0; x < xres; x++) { |
346 |
> |
dogamma = gamcor < .95 || gamcor > 1.05; |
347 |
> |
for (y = 0; y < numscans(&picres); y++) { |
348 |
> |
for (x = 0; x < scanlen(&picres); x++) { |
349 |
|
if (!dataonly) |
350 |
|
fscanf(fin, "%*d %*d"); |
351 |
|
if ((*getval)(scanln[x], fin) < 0) { |
352 |
|
fprintf(stderr, "%s: read error\n", progname); |
353 |
|
quit(1); |
354 |
|
} |
355 |
+ |
if (dogamma) |
356 |
+ |
setcolor(scanln[x], |
357 |
+ |
pow(colval(scanln[x],RED), gamcor), |
358 |
+ |
pow(colval(scanln[x],GRN), gamcor), |
359 |
+ |
pow(colval(scanln[x],BLU), gamcor)); |
360 |
+ |
if (doexposure) |
361 |
+ |
multcolor(scanln[x], exposure); |
362 |
|
} |
363 |
< |
if (fwritescan(scanln, xres, stdout) < 0 |
270 |
< |
|| fflush(stdout) < 0) { |
363 |
> |
if (fwritescan(scanln, scanlen(&picres), stdout) < 0) { |
364 |
|
fprintf(stderr, "%s: write error\n", progname); |
365 |
|
quit(1); |
366 |
|
} |
380 |
|
COLOR col; |
381 |
|
FILE *fp; |
382 |
|
{ |
383 |
< |
double vd[3]; |
383 |
> |
double vd[3]; |
384 |
|
|
385 |
|
if (fscanf(fp, "%lf %lf %lf", &vd[0], &vd[1], &vd[2]) != 3) |
386 |
|
return(-1); |
387 |
< |
setcolor(col, vd[0], vd[1], vd[2]); |
387 |
> |
setcolor(col, vd[rord[RED]], vd[rord[GRN]], vd[rord[BLU]]); |
388 |
|
return(0); |
389 |
|
} |
390 |
|
|
393 |
|
COLOR col; |
394 |
|
FILE *fp; |
395 |
|
{ |
396 |
< |
double vd[3]; |
396 |
> |
double vd[3]; |
397 |
|
|
398 |
|
if (fread((char *)vd, sizeof(double), 3, fp) != 3) |
399 |
|
return(-1); |
400 |
< |
setcolor(col, vd[0], vd[1], vd[2]); |
400 |
> |
setcolor(col, vd[rord[RED]], vd[rord[GRN]], vd[rord[BLU]]); |
401 |
|
return(0); |
402 |
|
} |
403 |
|
|
410 |
|
|
411 |
|
if (fread((char *)vf, sizeof(float), 3, fp) != 3) |
412 |
|
return(-1); |
413 |
< |
setcolor(col, vf[0], vf[1], vf[2]); |
413 |
> |
setcolor(col, vf[rord[RED]], vf[rord[GRN]], vf[rord[BLU]]); |
414 |
|
return(0); |
415 |
|
} |
416 |
|
|
423 |
|
|
424 |
|
if (fscanf(fp, "%d %d %d", &vi[0], &vi[1], &vi[2]) != 3) |
425 |
|
return(-1); |
426 |
< |
setcolor(col,(vi[0]+.5)/256.,(vi[1]+.5)/256.,(vi[2]+.5)/256.); |
426 |
> |
setcolor(col, (vi[rord[RED]]+.5)/256., |
427 |
> |
(vi[rord[GRN]]+.5)/256., (vi[rord[BLU]]+.5)/256.); |
428 |
|
return(0); |
429 |
|
} |
430 |
|
|
437 |
|
|
438 |
|
if (fread((char *)vb, sizeof(BYTE), 3, fp) != 3) |
439 |
|
return(-1); |
440 |
< |
setcolor(col,(vb[0]+.5)/256.,(vb[1]+.5)/256.,(vb[2]+.5)/256.); |
440 |
> |
setcolor(col, (vb[rord[RED]]+.5)/256., |
441 |
> |
(vb[rord[GRN]]+.5)/256., (vb[rord[BLU]]+.5)/256.); |
442 |
|
return(0); |
443 |
|
} |
444 |
|
|
447 |
|
COLOR col; |
448 |
|
FILE *fp; |
449 |
|
{ |
450 |
< |
double vd; |
450 |
> |
double vd; |
451 |
|
|
452 |
|
if (fscanf(fp, "%lf", &vd) != 1) |
453 |
|
return(-1); |
460 |
|
COLOR col; |
461 |
|
FILE *fp; |
462 |
|
{ |
463 |
< |
double vd; |
463 |
> |
double vd; |
464 |
|
|
465 |
|
if (fread((char *)&vd, sizeof(double), 1, fp) != 1) |
466 |
|
return(-1); |
487 |
|
FILE *fp; |
488 |
|
{ |
489 |
|
int vi; |
490 |
< |
double d; |
490 |
> |
double d; |
491 |
|
|
492 |
|
if (fscanf(fp, "%d", &vi) != 1) |
493 |
|
return(-1); |
502 |
|
FILE *fp; |
503 |
|
{ |
504 |
|
BYTE vb; |
505 |
< |
double d; |
505 |
> |
double d; |
506 |
|
|
507 |
|
if (fread((char *)&vb, sizeof(BYTE), 1, fp) != 1) |
508 |
|
return(-1); |
517 |
|
FILE *fp; |
518 |
|
{ |
519 |
|
fprintf(fp, "%15.3e %15.3e %15.3e\n", |
520 |
< |
colval(col,RED), |
521 |
< |
colval(col,GRN), |
522 |
< |
colval(col,BLU)); |
520 |
> |
colval(col,ord[0]), |
521 |
> |
colval(col,ord[1]), |
522 |
> |
colval(col,ord[2])); |
523 |
|
|
524 |
|
return(ferror(fp) ? -1 : 0); |
525 |
|
} |
531 |
|
{ |
532 |
|
float vf[3]; |
533 |
|
|
534 |
< |
vf[0] = colval(col,RED); |
535 |
< |
vf[1] = colval(col,GRN); |
536 |
< |
vf[2] = colval(col,BLU); |
534 |
> |
vf[0] = colval(col,ord[0]); |
535 |
> |
vf[1] = colval(col,ord[1]); |
536 |
> |
vf[2] = colval(col,ord[2]); |
537 |
|
fwrite((char *)vf, sizeof(float), 3, fp); |
538 |
|
|
539 |
|
return(ferror(fp) ? -1 : 0); |
544 |
|
COLOR col; |
545 |
|
FILE *fp; |
546 |
|
{ |
547 |
< |
double vd[3]; |
547 |
> |
double vd[3]; |
548 |
|
|
549 |
< |
vd[0] = colval(col,RED); |
550 |
< |
vd[1] = colval(col,GRN); |
551 |
< |
vd[2] = colval(col,BLU); |
549 |
> |
vd[0] = colval(col,ord[0]); |
550 |
> |
vd[1] = colval(col,ord[1]); |
551 |
> |
vd[2] = colval(col,ord[2]); |
552 |
|
fwrite((char *)vd, sizeof(double), 3, fp); |
553 |
|
|
554 |
|
return(ferror(fp) ? -1 : 0); |
560 |
|
FILE *fp; |
561 |
|
{ |
562 |
|
fprintf(fp, "%d %d %d\n", |
563 |
< |
(int)(colval(col,RED)*256.), |
564 |
< |
(int)(colval(col,GRN)*256.), |
565 |
< |
(int)(colval(col,BLU)*256.)); |
563 |
> |
(int)(colval(col,ord[0])*256.), |
564 |
> |
(int)(colval(col,ord[1])*256.), |
565 |
> |
(int)(colval(col,ord[2])*256.)); |
566 |
|
|
567 |
|
return(ferror(fp) ? -1 : 0); |
568 |
|
} |
575 |
|
register int i; |
576 |
|
BYTE vb[3]; |
577 |
|
|
578 |
< |
i = colval(col,RED)*256.; |
578 |
> |
i = colval(col,ord[0])*256.; |
579 |
|
vb[0] = min(i,255); |
580 |
< |
i = colval(col,GRN)*256.; |
580 |
> |
i = colval(col,ord[1])*256.; |
581 |
|
vb[1] = min(i,255); |
582 |
< |
i = colval(col,BLU)*256.; |
582 |
> |
i = colval(col,ord[2])*256.; |
583 |
|
vb[2] = min(i,255); |
584 |
|
fwrite((char *)vb, sizeof(BYTE), 3, fp); |
585 |
|
|
614 |
|
COLOR col; |
615 |
|
FILE *fp; |
616 |
|
{ |
617 |
< |
double vd; |
617 |
> |
double vd; |
618 |
|
|
619 |
|
vd = bright(col); |
620 |
|
fwrite((char *)&vd, sizeof(double), 1, fp); |