I'm writing some software that edits the edit block and I don't want to damage the makernotes. Of the known types which are safe to move in terms of offsets to the head of the exif data
Basically I don't want to update or touch makernotes unless I have to in order to make it exiftool safe :)
I don't think I fully understand your question, but as far as I know, exiftool leaves the whole makernote block at exactly the same spot in the file to prevent trouble (e.g. some undocumented relative and especially absolute pointers going haywire). All other metadata (exif, IPTC, XMP) can be moved to your hearts content as long as you keep all pointers pointing to the right locations (but these are all well known and documented so there should be no surprises).
Does this answer your question?
in a sense. Yes. Are pad bytes placed where needed to keep the makernote offset identical
I just tested the assumption that if a tag was deleted then the makernotes would still point to the same location. The value offset was changed so apparently exiftool isn't keeping the same value offset for the makernotes, but must be doing this on a as needed basis.
Just to clarify. As a test I deleted the date taken and datedigitized tags and the makernotes offset was changed. However the makernotes themselves were apple which I know doesn't use tags relative to the start of the tiff header. They use tags relative to the maker note block. So is exiftool taken each type of makernote into consideration and if so how does it handle unknown blocks.
I was also thinking what if you added so many ifd0 and exif tags that it wasn't possible to keep the makernotes at the original offset value.
ExifTool recalculates the offsets embedded in the makernote block when it moves them. A minor warning is issued when writing unrecognized maker notes (because any offsets won't be updated).
- Phil
However if one were making a photo album app with mild metadata editing capabilities one could take the strategy of do no harm to the makernotes by keeping the offset from the start of the tiff header the same right?
Keeping the original makernote is a good start, but it won't solve all of the problems. This thread (https://www.dpreview.com/forums/post/21900411) may be interesting to you.
- Phil
Okay. I read the thread but didn't see anything that could be a problem. I'm writing my own editor and don't plan on using the offset schema tag. What else should I consider to make this exiftool and makernote safe. As long as I keep the original makernote offset the same.
Did you see my comments about information being stored outside the makernote block? Even if you keep the block in the same location you still need to worry about this.
- Phil
Okay that information however won't pertain the to makernote block itself will it. That should just be the original exif ifd information right? I would have to make sure that the remaining values outside of the makernote block are reoffset and redistributed in order to keep the makernote block in the same spot.
No. Makernote information may lay outside the makernote data block.
Really. How is that and which types (as listed in your tag database) are the culprits
You can see for yourself. I listed the models where show this problem. You can download samples of each from here (https://exiftool.org/sample_images.html). Look at them with the Exiftool -htmlDump feature.
- Phil
Thanks Phil. I'm trying to avoid the problem of changing too much exif in my app. Would love to just edit XMP data. But then I realized changing/adding camera and date information requires changing the exif data.
Just to be clear. All of these types have problems ;D
I'm going to start a database of these issues from your list of files for makernotes that go by your typing system, camera sample, makernote structure and whether it is contained in the app1 segment of exif. Would you be interested in hosting it. Could be useful
I would have to see what your database looks like before I could answer this. But my guess is that it wouldn't be worth posting because it would be of interest to only a very small number of people.
- Phil
Is there a way to have exiftool output whether or not a photo has makernotes to a csv (yes/no result for the file(
exiftool -p "$filename,$makernotes:all" DIR
- Phil