-
Notifications
You must be signed in to change notification settings - Fork 281
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
Unable to set Exif resolution metadata in tiff files. #2794
Comments
@henryborchers That is intentional behaviour. The API The
Including Resolution in that table is debatable, and the implementation of the JP2 image handler is otherwise. It would be reasonable to remove Resolution (and possibly other tags) from this restriction. I'm surprised at the inconsistency between different image handlers and that's worth investigation. You and I discussed this 5 years ago. At that time, I was very busy with the release of Exiv2 0.27 (RC1, RC2 etc) and said "I'll deal with this later". I didn't participate in the v0.28 project and worked on "the dots" (0.27.1, 0.27.2 etc). As I've retired, I recommend that you submit a PR with the necessary changes. You'll enjoy working with the splendid folks who now manage Exiv2. |
@clanmills As always, I appreciate everything you've done for this project and all the help you've personally provided me. I completely agree that we would not want to have a program that breaks the image file. I do feel that it should be reasonable to change the x and y resolution and the resolution unit for a tiff file like we can do for jp2 images. I often have image scans of books and other archival collections that are generated with the incorrect dots per inch as part of the pipeline and need to be corrected before they become part of the digital archive. I'm mostly a python programmer that knows enough to consume a c++ library enough to generate simple wrappers. However I'm not super proficient in generating production quality c++ code. That said it would be good practice for me to try a PR for a C++ project such this. |
@henryborchers Thank you for the kind comments about my Exiv2 efforts. I'm really happy to have contributed and happy that Team Exiv2 maintain and develop the code. You'll be surprised at what you can achieve with your PR. As a minimum, you could remove two lines of code. If that doesn't break the test suite, it might be accepted and you're done! My usual experience is that there is more and usually much more to get a change accepted. You'll investigate every image handler, update the test suite and some documentation. However, submitting a PR to remove two lines of code will receive the attention of Team Exiv2. You will learn if the team is willing to engage with this topic. Remember, like you, they have demanding full-time jobs. Here's the minimum you need:
|
@clanmills , you are welcome. I came to the same conclusion by patching those lines out (something you suggested to me 5 year ago ) and got it work! When I get a moment, I'll see if I can get a PR together. |
Describe the bug
I'm unable to set the Exif.Image.XResolution and the Exif.Image.YResolution for tiff files with either than cli or the C++ api.
However, this technique works as expected jp2 files.
To Reproduce
Steps to reproduce the behavior:
cli:
C++ Api:
Expected behavior
I would expect that XResolution would be changed to 300 or 300/1.
Desktop (please complete the following information):
Additional context
This was originally addressed in #463.
The text was updated successfully, but these errors were encountered: