exiv2
exiv2 copied to clipboard
allow physical resolution metadata to be changed in tiff metadata
This addresses my problem in #2794
Tiff files should be allowed to adjust the Exif.Image.XResolution, Exif.Image.YResolution, and the Exif.Image.ResolutionUnit fields just like it can be done with JP2 files.
These metadata fields are for provenance purposes only and describes the physical capabilities of how an image was captured. They have no affect on the way the image is displayed digitally by software.
We use these fields in digital archiving to capture the provenance of the dots-per-inch use by the scanner when we scanned a photo or a fragile page of a rare book. Unfortunately, the scanning pipeline will sometimes strip out these fields and they will have to be manually added back in. Right now, exiv2 can modify these fields in JP2 files but not tiff files. However, the code is modified as it is in this PR, it can do both.
Looks ok, but need to figure out the new failing test now
A minor snag is, that although these should be allowed to be changed, it might not be allowed to remove them if they're already there...
For example, they are mandatory in the TIFF/EP spec (e.g. DNGs), but optional in Exif.
@kmilos interesting! What do you recommend? Would it be possible to make the field editable but not removable?
Would it be possible to make the field editable but not removable?
That would be ideal, but no ideas yet on how to get there...