6 |
|
* Added white-balance adjustment 10/01 (GW). |
7 |
|
*/ |
8 |
|
|
9 |
– |
#include <stdio.h> |
10 |
– |
#include <string.h> |
9 |
|
#include <math.h> |
12 |
– |
#include <time.h> |
10 |
|
|
11 |
|
#include "platform.h" |
12 |
|
#include "color.h" |
13 |
|
#include "resolu.h" |
14 |
+ |
#include "rtio.h" |
15 |
|
|
16 |
|
int rgbinp = -1; /* input is RGBE? */ |
17 |
|
int rgbout = 0; /* output should be RGBE? */ |
34 |
|
void *p |
35 |
|
) |
36 |
|
{ |
37 |
< |
char fmt[32]; |
37 |
> |
char fmt[MAXFMTLEN]; |
38 |
|
|
39 |
|
if (formatval(fmt, s)) { /* check if format string */ |
40 |
|
if (!strcmp(fmt,COLRFMT)) |
222 |
|
setcolr(scanout[x], colval(scanin[x],RED), |
223 |
|
colval(scanin[x],GRN), |
224 |
|
colval(scanin[x],BLU)); |
225 |
< |
fwrite((char *)scanout, sizeof(COLR), xmax, stdout); |
225 |
> |
putbinary((char *)scanout, sizeof(COLR), xmax, stdout); |
226 |
|
} else |
227 |
|
fwritescan(scanin, xmax, stdout); |
228 |
|
if (ferror(stdout)) |