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); |
432 |
|
return(0); |
433 |
|
userr: |
434 |
|
fprintf(stderr, |
435 |
< |
"Usage: %s [-v][-f[adfc][-t][-s sf .. | -c ce ..][-r[fb]] m1 [.+*/] .. > mres\n", |
435 |
> |
"Usage: %s [-v][-f[adfc][-t][-s sf .. | -c ce ..][-rf|-rb] m1 [.+*/] .. > mres\n", |
436 |
|
argv[0]); |
437 |
|
return(1); |
438 |
|
} |