81 |
|
{ |
82 |
|
char fmt[MAXFMTLEN]; |
83 |
|
|
84 |
< |
if (isformat(s)) { |
85 |
< |
formatval(fmt, s); |
86 |
< |
wrongformat = strcmp(fmt, COLRFMT); |
87 |
< |
} else if (isaspect(s)) |
84 |
> |
if (formatval(fmt, s)) |
85 |
> |
wrongformat = strcmp(fmt, COLRFMT) && strcmp(fmt, SPECFMT); |
86 |
> |
else if (isaspect(s)) |
87 |
|
pixaspect *= aspectval(s); |
88 |
+ |
else if (isncomp(s)) |
89 |
+ |
NCSAMP = ncompval(s); |
90 |
+ |
else if (iswlsplit(s)) |
91 |
+ |
wlsplitval(WLPART, s); |
92 |
|
return(0); |
93 |
|
} |
94 |
|
|
98 |
|
int i; |
99 |
|
double d; |
100 |
|
|
101 |
< |
progname = fixargv0(argv[0]); |
101 |
> |
progname = argv[0]; |
102 |
|
|
103 |
|
for (i = 1; i < argc; i++) |
104 |
|
if (argv[i][0] == '-') |
476 |
|
quiterr("out of memory in ra2ps"); |
477 |
|
/* convert image */ |
478 |
|
for (y = ymax-1; y >= 0; y--) { |
479 |
< |
if (freadcolrs(scanin, xmax, stdin) < 0) |
479 |
> |
if (fread2colrs(scanin, xmax, stdin, NCSAMP, WLPART) < 0) |
480 |
|
quiterr("error reading Radiance picture"); |
481 |
< |
if (putprim == Cputprim || devgam != 1.) { |
481 |
> |
if ((putprim == Cputprim) | (devgam != 1.)) { |
482 |
|
if (bradj) /* adjust exposure */ |
483 |
|
shiftcolrs(scanin, xmax, bradj); |
484 |
|
colrs_gambs(scanin, xmax); /* gamma compression */ |