Project

General

Profile

Bug #602

Exiv2 generated TIFF incompatible with libtiff

Added by Udi Fuchs almost 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
tools
Target version:
Start date:
12 Jan 2009
Due date:
% Done:

100%

Estimated time:

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

dsc_0113_exiv2.tif (34.8 KB) dsc_0113_exiv2.tif File created with exiv2 command-line Udi Fuchs, 12 Jan 2009 20:29
dsc_0113_ufraw.tif (24.8 KB) dsc_0113_ufraw.tif File created with ufraw Udi Fuchs, 12 Jan 2009 20:29
dsc_0113.tif (17.1 KB) dsc_0113.tif Original TIFF file, generated with ufraw without EXIF data Udi Fuchs, 12 Jan 2009 21:41
dsc_0113.exv (34.8 KB) dsc_0113.exv exv file generated with exiv2 ex from a NEF file Udi Fuchs, 12 Jan 2009 21:41

Associated revisions

Revision 1759 (diff)
Added by Andreas Huggel over 12 years ago

#602: Added specialized insert and delete code for TIFF-like target images.

History

#1

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?

#2

Updated by Udi Fuchs almost 13 years ago

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

#3

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.

#4

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.

#5

Updated by Andreas Huggel over 12 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF