Feature #577

Updated by Robin Mills over 4 years ago

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.