2004.09.16 17:55 "Re: [Tiff] reading private subdirs", by Chris Cox
some EXIF writers use tag offsets in their MakerNotes that are based on the start of the EXIF data subdir, rather than the start of the MakerNote subdir. so, changing the length of the non-MakerNote data will destroy all those offsets.
I'd like to add: SIGH. TIFF data blocks (tag values) should be self-contained. Should not point to other tags, other subdirs, or inside other tags, or whatever. Thus, TIFF data (tag values) should be completely relocatable. Thus, enabling page joggling apps and TIFF editing apps and the like. Failure to comply to this scheme leads to major trouble, most of which is bound to result in corruption of *the offender's data* after these data joggling apps did their thing.
Exceptions are the clearly documented TileOffsets/StripOffsets tags, the SubIFDs tag. And also, the spec allows for private dir schemes (which is unfortunate, but there seems little use in trying to battle with it, and damage can be contained if those private dir tags at least get documented publicly). NO OTHER EXCEPTIONS can be made. This is a very essential corner stone of the TIFF file format philosophy.
Just wanted to add that hopefully clear comment, for hopefully at least some future potential offenders to read.
Yes, but the camera manufacturers are already doing these horrible things, and we can't change existing cameras.... But I hope we can educate them in the errors of their ways and get them to fix future cameras.
Also, some maker notes (any undocumented tag in EXIF) contain information about the image (width, height, etc.) that can't be updated across edits to the image. And some contain references to other tags or other bits of the image data and can't be updated or preserved.
This is why you have to delete undocumented tags when doing ANY edits to an image with EXIF data.