676 |
|
mres = loadop(mop+nmats); |
677 |
|
if (mres == NULL) |
678 |
|
return(1); |
679 |
< |
if (outfmt == DTfromHeader) /* check data type */ |
679 |
> |
if ((outfmt == DTfromHeader) & (mres->dtype < DTspec)) |
680 |
|
outfmt = mres->dtype; |
681 |
< |
if (outfmt == DTrgbe) { |
681 |
> |
if (outfmt == DTrgbe) { /* check data type */ |
682 |
|
if (mres->ncomp > 3) |
683 |
|
outfmt = DTspec; |
684 |
|
else if (mres->dtype == DTxyze) |
685 |
|
outfmt = DTxyze; |
686 |
|
} |
687 |
+ |
#if DTrmx_native==DTfloat |
688 |
+ |
if (outfmt == DTdouble) |
689 |
+ |
fprintf(stderr, |
690 |
+ |
"%s: warning - writing float result as double\n", |
691 |
+ |
argv[0]); |
692 |
+ |
#endif |
693 |
|
newheader("RADIANCE", stdout); /* write result to stdout */ |
694 |
|
printargs(argc, argv, stdout); |
695 |
|
return(rmx_write(mres, outfmt, stdout) ? 0 : 1); |