2012.10.11 23:04 "Re: [Tiff] TIFFTAG_EXIFIFD tag type change in libTIFF 4.0.x?", by Andrew Pangborn
Without even looking into this issue, I should mention that due to libtiff 4 supporting the new BigTIFF format (supports huge files via 64-bit offsets), offsets are now produced/consumed as 64-bit unsigned types.
Thanks for pointing that out Bob. It looks like our code was already using toff_t for the offset value passed to TIFFSetField for this tag, which is now a uint64, so I think we are okay there.
I agree that a 64-bit offset is required for offsets in a BigTIFF file, but I'm concerned with writing a 32-bit offset for classic tiff.
I found the following in tif_dirwrite.c
if( TIFFDataWidth(in_datatype) == 8 && !(tif->tif_flags&TIFF_BIGTIFF) )
if( in_datatype == TIFF_LONG8 )
datatype = TIFF_LONG;
else if( in_datatype == TIFF_SLONG8 )
datatype = TIFF_SLONG;
else if( in_datatype == TIFF_IFD8 )
datatype = TIFF_IFD;
datatype = in_datatype;
I think if I add an additional entry to tif_dirinfo.c with TIFF_LONG8 instead of TIFF_IFD8 it should work for both classic tiff and BigTIFF?