11 |
|
#include <stdio.h> |
12 |
|
|
13 |
|
#include "color.h" |
14 |
+ |
#include "resolu.h" |
15 |
|
|
16 |
|
int bradj = 0; /* brightness adjustment */ |
17 |
|
|
80 |
|
transfer() /* transfer Radiance picture */ |
81 |
|
{ |
82 |
|
extern double pow(); |
83 |
+ |
int order; |
84 |
|
int xmax, ymax; |
85 |
|
COLR *scanin; |
86 |
|
register int x; |
87 |
|
int y; |
88 |
|
/* get header info. */ |
89 |
|
if (checkheader(stdin, COLRFMT, stdout) < 0 || |
90 |
< |
fgetresolu(&xmax, &ymax, stdin) != (YMAJOR|YDECR)) |
90 |
> |
(order = fgetresolu(&xmax, &ymax, stdin)) < 0) |
91 |
|
quiterr("bad picture format"); |
92 |
|
if (bradj) |
93 |
|
fputexpos(pow(2.0, (double)bradj), stdout); |
96 |
|
printf("%s -r\n\n", progname); |
97 |
|
} else |
98 |
|
printf("%s\n\n", progname); |
99 |
< |
fputresolu(YMAJOR|YDECR, xmax, ymax, stdout); |
99 |
> |
fputresolu(order, xmax, ymax, stdout); |
100 |
|
/* allocate scanline */ |
101 |
|
scanin = (COLR *)malloc(xmax*sizeof(COLR)); |
102 |
|
if (scanin == NULL) |