5 |
|
* program to convert from RADIANCE RLE to flat format |
6 |
|
*/ |
7 |
|
|
8 |
– |
#include <stdio.h> |
8 |
|
#include <math.h> |
10 |
– |
#include <time.h> |
11 |
– |
#include <string.h> |
9 |
|
|
10 |
|
#include "platform.h" |
11 |
< |
#include "rtprocess.h" |
11 |
> |
#include "rtio.h" |
12 |
> |
#include "paths.h" |
13 |
|
#include "color.h" |
14 |
|
#include "resolu.h" |
15 |
|
|
16 |
< |
#define dumpheader(fp) fwrite(headlines, 1, headlen, fp) |
16 |
> |
#define dumpheader(fp) putbinary(headlines, 1, headlen, fp) |
17 |
|
|
18 |
|
int bradj = 0; /* brightness adjustment */ |
19 |
|
int doflat = 1; /* produce flat file */ |
171 |
|
if (bradj) |
172 |
|
shiftcolrs(scanin, xmax, bradj); |
173 |
|
if (doflat) |
174 |
< |
fwrite((char *)scanin, sizeof(COLR), xmax, fp); |
174 |
> |
putbinary((char *)scanin, sizeof(COLR), xmax, fp); |
175 |
|
else |
176 |
|
fwritecolrs(scanin, xmax, fp); |
177 |
|
if (ferror(fp)) { |
195 |
|
void *p |
196 |
|
) |
197 |
|
{ |
198 |
< |
char fmt[32]; |
198 |
> |
char fmt[MAXFMTLEN]; |
199 |
|
int n; |
200 |
|
|
201 |
|
if (formatval(fmt, s)) |