Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow physical resolution metadata to be changed in tiff metadata #2808

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

henryborchers
Copy link
Contributor

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.

@ghost
Copy link

ghost commented Oct 26, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@kmilos
Copy link
Collaborator

kmilos commented Oct 27, 2023

Looks ok, but need to figure out the new failing test now

@kmilos
Copy link
Collaborator

kmilos commented Oct 27, 2023

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.

@henryborchers
Copy link
Contributor Author

@kmilos interesting! What do you recommend? Would it be possible to make the field editable but not removable?

@kmilos
Copy link
Collaborator

kmilos commented Oct 28, 2023

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants