--- ray/src/px/ra_tiff.c 2003/07/01 22:44:02 2.22 +++ ray/src/px/ra_tiff.c 2003/07/21 22:30:19 2.25 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: ra_tiff.c,v 2.22 2003/07/01 22:44:02 greg Exp $"; +static const char RCSid[] = "$Id: ra_tiff.c,v 2.25 2003/07/21 22:30:19 schorsch Exp $"; #endif /* * Program to convert between RADIANCE and TIFF files. @@ -10,6 +10,7 @@ static const char RCSid[] = "$Id: ra_tiff.c,v 2.22 200 #include #include #include +#include #include "tiffio.h" #include "color.h" #include "resolu.h" @@ -160,13 +161,14 @@ doneopts: if (i != argc-2) goto userr; /* consistency checks */ - if (CHK(C_GRY)) + if (CHK(C_GRY)) { if (cvts.phot == PHOTOMETRIC_RGB) cvts.phot = PHOTOMETRIC_MINISBLACK; else { cvts.phot = PHOTOMETRIC_LOGL; cvts.comp = COMPRESSION_SGILOG; } + } if (CHK(C_TWRD|C_TFLT) == (C_TWRD|C_TFLT)) goto userr; @@ -541,6 +543,8 @@ initfromrad() /* initialize input from a Radiance pi cvts.tf = Color2RRGGBB; SET(C_RFLT); } else if (CHK(C_TFLT)) { + TIFFSetField(cvts.tif, TIFFTAG_SAMPLEFORMAT, + SAMPLEFORMAT_IEEEFP); cvts.tf = Color2RfGfBf; SET(C_RFLT); } else @@ -553,6 +557,8 @@ initfromrad() /* initialize input from a Radiance pi cvts.tf = Color2GGry; SET(C_RFLT); } else if (CHK(C_TFLT)) { + TIFFSetField(cvts.tif, TIFFTAG_SAMPLEFORMAT, + SAMPLEFORMAT_IEEEFP); cvts.tf = Color2Gryf; SET(C_RFLT); } else