10 |
|
|
11 |
|
#include <stdio.h> |
12 |
|
|
13 |
+ |
#include <math.h> |
14 |
+ |
|
15 |
|
#include "tiffio.h" |
16 |
|
|
17 |
|
#include "color.h" |
18 |
|
|
19 |
< |
extern double atof(); |
19 |
> |
#include "resolu.h" |
20 |
|
|
21 |
+ |
|
22 |
|
extern char *malloc(), *realloc(); |
23 |
|
|
24 |
|
int lzcomp = 0; /* use Lempel-Ziv compression? */ |
145 |
|
fputs(" -r\n", stdout); |
146 |
|
fputformat(COLRFMT, stdout); |
147 |
|
putchar('\n'); |
148 |
< |
fputresolu(YDECR|YMAJOR, xmax, ymax, stdout); |
148 |
> |
fprtresolu(xmax, ymax, stdout); |
149 |
|
/* convert image */ |
150 |
|
if (nsamps == 1) |
151 |
|
pconfig = 1; |
207 |
|
if (strcmp(inpf, "-") && freopen(inpf, "r", stdin) == NULL) |
208 |
|
quiterr("cannot open Radiance input file"); |
209 |
|
if (checkheader(stdin, COLRFMT, NULL) < 0 || |
210 |
< |
fgetresolu(&xmax, &ymax, stdin) != (YDECR|YMAJOR)) |
210 |
> |
fgetresolu(&xmax, &ymax, stdin) < 0) |
211 |
|
quiterr("bad Radiance picture"); |
212 |
|
/* open TIFF file */ |
213 |
|
if ((tif = TIFFOpen(outf, "w")) == NULL) |