Bug #602
Exiv2 generated TIFF incompatible with libtiff
100%
Description
It seems that embedding EXIF data in TIFF files causes libtiff to complain.
The first attached TIFF file was created with the command-line:
exiv2 in dsc_0113_exiv2.tif
The exv file originated from a Nikon D70 NEF file, but I think the problem is general.
Openning this file with any program based on libtiff (gimp, display, tifftopnm) fails with the error:
TIFF directory is missing required "StripOffsets" field. `MissingRequired'.
The second file was create with ufraw. This TIFF image opens fine but produces warnings:
$ tifftopnm dsc_0113_ufraw.tif > dsc_0113_ufraw.pnm
TIFFReadDirectory: Warning, dsc_0113_ufraw.tif: invalid TIFF directory; tags are not sorted in ascending order.
TIFFReadDirectory: Warning, dsc_0113_ufraw.tif: unknown field with tag 11 (0xb) encountered.
TIFFReadDirectory: Warning, dsc_0113_ufraw.tif: unknown field with tag 36867 (0x9003) encountered.
TIFFReadDirectory: Warning, dsc_0113_ufraw.tif: unknown field with tag 37398 (0x9216) encountered.
tifftopnm: writing PPM file
Udi
Files
Associated revisions
History
Updated by Andreas Huggel almost 13 years ago
$ exiv2 in dsc_0113_exiv2.tif
where does the dsc_0113_exiv2.tif file come from, does it have a StripOffsets tag? Can you please provide this and the corresponding exv file so that I can run the above command here?
Updated by Udi Fuchs almost 13 years ago
- File dsc_0113.tif dsc_0113.tif added
- File dsc_0113.exv dsc_0113.exv added
Requested files added. The TIFF file I'm starting with was created with ufraw/libtiff without embedding EXIF data in it, and it opens fine in all programs.
Udi
Updated by Andreas Huggel almost 13 years ago
exiv2 in dsc_0113_exiv2.tif
The "exiv2 in" command seems to overwrite existing tags in the tif file, the result is essentially the exv file, there is definitely something wrong here.
$ tifftopnm dsc_0113_ufraw.tif > dsc_0113_ufraw.pnm
TIFFReadDirectory: Warning, dsc_0113_ufraw.tif: invalid TIFF directory; tags are not sorted in ascending order.
Looking at the exiv2 -pa output, the only issue I can see is that there are two Exif.Image.Orientation tags, which is not valid. Maybe that's the reason for this warning.
(Exiv2 does sort tags in each directory when writing, except for makernote IFDs)
TIFFReadDirectory: Warning, dsc_0113_ufraw.tif: unknown field with tag 11 (0xb) encountered.
TIFFReadDirectory: Warning, dsc_0113_ufraw.tif: unknown field with tag 36867 (0x9003) encountered.
TIFFReadDirectory: Warning, dsc_0113_ufraw.tif: unknown field with tag 37398 (0x9216) encountered.
Yes, I can see these (Exif.Image) tags. The Exiv2 TIFF parser doesn't filter anything, if you don't want these, the application will have to suppress them.
Updated by Andreas Huggel over 12 years ago
- Category set to tools
- Status changed from New to Resolved
- Target version set to 0.18.1
- % Done changed from 0 to 100
The issue with the command line utility is fixed with r1759. For TIFF-like target images, image and metadata are in the same TIFF structure and special care is required to determine which tags and IFDs should be treated as metadata and copied by the utility so that tags containing image information are not overwritten. The same applies for the remove action.
#602: Added specialized insert and delete code for TIFF-like target images.