13 |
|
#include "tiffio.h" |
14 |
|
#include "color.h" |
15 |
|
#include "tonemap.h" |
16 |
+ |
#include "tmaptiff.h" |
17 |
|
#include "resolu.h" |
18 |
|
|
19 |
|
|
43 |
|
RESOLU rs; /* picture resolution */ |
44 |
|
} PICTURE; |
45 |
|
|
46 |
< |
extern PICTURE *openpicture(); |
46 |
> |
//extern PICTURE *openpicture(); |
47 |
|
|
48 |
|
#define closepicture(p) (fclose((p)->fp),free((void *)(p))) |
49 |
|
|
50 |
|
static gethfunc headline; |
51 |
|
|
52 |
+ |
static int headline(char *s, void *pp); |
53 |
+ |
static PICTURE * openpicture(char *fname); |
54 |
+ |
static int tmap_picture(char *fname, PICTURE *pp); |
55 |
+ |
static int tmap_tiff(char *fname, TIFF *tp); |
56 |
+ |
static int putimage(uint16 or, uint32 xs, uint32 ys, float xr, float yr, |
57 |
+ |
uint16 ru, BYTE *pd); |
58 |
|
|
59 |
+ |
|
60 |
|
int |
61 |
|
main( |
62 |
|
int argc, |
159 |
|
} |
160 |
|
|
161 |
|
|
162 |
< |
PICTURE * |
163 |
< |
openpicture(fname) /* open/check Radiance picture file */ |
164 |
< |
char *fname; |
162 |
> |
static PICTURE * |
163 |
> |
openpicture( /* open/check Radiance picture file */ |
164 |
> |
char *fname |
165 |
> |
) |
166 |
|
{ |
167 |
|
FILE *fp; |
168 |
|
register PICTURE *pp; |
201 |
|
} |
202 |
|
|
203 |
|
|
204 |
< |
int |
205 |
< |
tmap_picture(fname, pp) /* tone map Radiance picture */ |
206 |
< |
char *fname; |
207 |
< |
register PICTURE *pp; |
204 |
> |
static int |
205 |
> |
tmap_picture( /* tone map Radiance picture */ |
206 |
> |
char *fname, |
207 |
> |
register PICTURE *pp |
208 |
> |
) |
209 |
|
{ |
210 |
|
uint16 orient; |
211 |
|
int xsiz, ysiz; |
229 |
|
} |
230 |
|
|
231 |
|
|
232 |
< |
tmap_tiff(fname, tp) /* tone map SGILOG TIFF */ |
233 |
< |
char *fname; |
234 |
< |
TIFF *tp; |
232 |
> |
static int |
233 |
> |
tmap_tiff( /* tone map SGILOG TIFF */ |
234 |
> |
char *fname, |
235 |
> |
TIFF *tp |
236 |
> |
) |
237 |
|
{ |
238 |
|
float xres, yres; |
239 |
|
uint16 orient, resunit, phot; |
262 |
|
} |
263 |
|
|
264 |
|
|
265 |
< |
putimage(or, xs, ys, xr, yr, ru, pd) /* write out our image */ |
266 |
< |
uint16 or; |
267 |
< |
uint32 xs, ys; |
268 |
< |
float xr, yr; |
269 |
< |
uint16 ru; |
270 |
< |
BYTE *pd; |
265 |
> |
static int |
266 |
> |
putimage( /* write out our image */ |
267 |
> |
uint16 or, |
268 |
> |
uint32 xs, |
269 |
> |
uint32 ys, |
270 |
> |
float xr, |
271 |
> |
float yr, |
272 |
> |
uint16 ru, |
273 |
> |
BYTE *pd |
274 |
> |
) |
275 |
|
{ |
276 |
|
register int y; |
277 |
|
uint32 rowsperstrip; |