Feature #577

Convert relative makernote offsets to absolute offsets

Added by Andreas Huggel over 8 years ago. Updated over 8 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:Andreas Huggel% Done:

0%

Category:exif
Target version:1.0

Description

Some makernotes use IFD offsets relative to the beginning of the makernote (or somewhere near the beginning of the makernote). This has certain advantages, but it complicates matters for users who would like to follow the offset (e.g., to access a preview image pointed to from a makernote tag of a TIFF image).

Thus relative offsets should be converted to absolute offsets.

Additional information:

Essentially this requires adding the base offset to the tag value. And then removing it again before writing the value back. Parsing the Exif/TIFF metadata is a 2 step process: first it is read into a TiffComponent tree (TiffReader), then the metadata is extracted from the components of the tree into the metadata containers (TiffDecoder). The base offset is available in the reader, but not in the decoder. To implement this properly, logic similar to that in the reader has to be added to the decoder to "change state" (which includes the base offset). This would make the base offset available when the tag is decoded. The same applies when writing metadata back for the encoder (which is used for "non-intrusive writing) and finally the write functions need to be adjusted.


Related issues

Related to Exiv2 - Feature #473: Support Preview images Closed

History

#1 Updated by Andreas Huggel over 8 years ago

Note that absolute offsets means offsets from the start of the image file / memory area, not just the start of the TIFF header. This is relevant for image formats with an embedded Exif block (eg, JPEG)

Should there be another set of synthesized tags, pointing to the start of the TIFF header: Exif.TiffHeader.Offset (and Exif.TiffHeader.ByteOrder, etc)

#2 Updated by Andreas Huggel over 8 years ago

  • Assignee set to Andreas Huggel

#3 Updated by Andreas Huggel over 8 years ago

  • Target version set to 1.0

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux