| 38 |
|
static int |
| 39 |
|
loadmatrix(ROPMAT *rop) |
| 40 |
|
{ |
| 41 |
< |
if (rop->mtx != NULL) |
| 41 |
> |
if (rop->mtx != NULL) /* already loaded? */ |
| 42 |
|
return(0); |
| 43 |
|
|
| 44 |
|
rop->mtx = rmx_load(rop->inspec, rop->rmp); |
| 239 |
|
while (rpos-- > 0) { |
| 240 |
|
if (mright == NULL) |
| 241 |
|
break; |
| 242 |
< |
mright = binaryop(mop[rpos].inspec, |
| 242 |
> |
mright = binaryop(mop[rpos+1].inspec, |
| 243 |
|
loadop(mop+rpos), mop[rpos].binop, mright); |
| 244 |
|
} |
| 245 |
|
return(mright); |
| 418 |
|
/* write result to stdout */ |
| 419 |
|
if (outfmt == DTfromHeader) |
| 420 |
|
outfmt = mres->dtype; |
| 421 |
+ |
if ((outfmt == DTrgbe) & (mres->ncomp > 3)) |
| 422 |
+ |
outfmt = DTspec; |
| 423 |
|
if (outfmt != DTascii) |
| 424 |
|
SET_FILE_BINARY(stdout); |
| 425 |
|
newheader("RADIANCE", stdout); |