1994.11.14 17:56 "Libtiff, DOUBLE and FLOAT", by Niles Ritter
I've been working with some other people on developing new TIFF tags (for storing Geographic Projection info) and we have found need for the TIFF 6.0 DOUBLE format tags (SRATIONAL isnt enough). However, on looking through the libtiff code I noticed several things:
- The DOUBLE format is not fully supported: In the routine TIFFFetchData() where bytes are supposed to be swapped on machines with byte-order opposite that of the file, the FLOAT type is correctly swapped, but the DOUBLE is not (I think appending a TIFF_DOUBLE case after TIFF_RATIONAL will do the trick, since the swap-procedure is the same). This has never been noticed because none of Sam's Tags are IEEE.
- Also, when writing DOUBLE's there is no TIFFWriteDoubleArray() routine to handle the tag. This routine should in turn make a reference to a TIFFCvtNativeToIEEEDouble(), which brings me to the next item:
- The FLOAT tag is no longer handled for VAX (or a "tahoe", whatever that is). Formerly the module "tif_machdep.c" had an IEEEFLOAT2NATIVE macro for converting from IEEE to the perverse VAX formats. Theoretically, these should have been migrated over to the tif_vms.c module, along with the routine TIFFCvtNativeToIEEEFloat() (which gets #defined to no-op for IEEE machines, but it looks like they never made it. The same holds for DOUBLE.
Has anyone else implemented these tag types, yet? On the VAX? If not, I'll probably wind up doing it, and will send the diffs to Sam.