
Thread
2007.11.23 18:58 "Re: [Tiff] Bug in _TIFFFindFieldInfo and some DNG tags in 3.8.2", by Frank Warmerdam
The DNG tags TIFFTAG_BLACKLEVEL, TIFFTAG_DEFAULTCROPSIZE and TIFFTAG_DEFAULTCROPORIGIN, can be SHORT, LONG or RATIONAL. But in a test file that is LONG, libTIFF is interpreting always as RATIONAL since TIFFFindFieldInfo is using the first definition found.
The problem is in the code:
if (fip->field_tag == tag &&
(dt == TIFF_ANY || fip->field_type == dt))
return (tif->tif_foundfield = fip);It exists inside an "else" of (dt != TIFF_ANY), so it is ignoring the second test always.
In libTIFF 4.0 this implementation is completely different, so I don't know if this bug report is relevant or not. And I did not test it with version 4.0, so I also don't know if it is fixed. If anyone needs a test image, please let me know.
Antonio,
If you file a ticket and assign it to me (warmerdam@pobox.com) along with a pointer to a file demonstrating the issue, I'll try and look into it.
The plan is still to issue a 3.9.0 based on the pre-4 technology so I'd like to ensure it is working well. Your other question about custom tags is good, but I'm hoping Joris or Andrey will have a response.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org