-
Notifications
You must be signed in to change notification settings - Fork 278
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
Several Exif keys added in easyaccess #2362
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2362 +/- ##
=======================================
Coverage 63.51% 63.52%
=======================================
Files 119 119
Lines 20624 20631 +7
Branches 10233 10238 +5
=======================================
+ Hits 13100 13106 +6
Misses 5395 5395
- Partials 2129 2130 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Hi @norbertwg , thanks for your PR. I see that you have been discussing with @postscript-dev & @kmilos about how to make the changes on this file. I have no experience with easyaccess but so far your changes look good and the CI is happy with them. You mentioned that you have been analyzing some sample images to validate your changes. I think it would be a good idea to add some of the images to our test suite to verify that your changes work as expected. Did you explore the area of the code in which we run our tests? And in the folder In case you are willing to add some of these tests but you need help to do that, we can help you with it 😸 |
@piponazo Adding some images to the test suite should not be a problem. But as I am not familiar with python, adding tests will be difficult. Give me some days to look into the existing tests. Then I will get back, hopefully with an idea how to procede. |
@norbertwg |
@postscript-dev thanks, will have a look into it. |
@postscript-dev
I got errors. After comparing it with the approach in easyaccess.py I got following approach working:
Seems, the documentation needs an update. easyaccess.py is using CopyFiles. As the documentation suggests CopyTmpFiles, I assume CopyTmpFiles is the preferred way, right? And another question: When I started with the test cases, I thought it could be a good idea to check if all other existings test cases still run with my modification. To run them some executables are needed, not only exiv2, I am working with Visual Studio and the solution created following the instructions does not build those additional programs. Is there a simple way to create them? |
I can find examples (e.g., bash_tests/test_exifprint_lint.py) where the README-TESTS.md copy format is used, so perhaps there was something else wrong. You can run an individual test to check that it is working correctly. For example, when in the $ python3 runner.py bash_tests/test_exifprint_lint.py
.
----------------------------------------------------------------------
Ran 1 test in 0.151s
OK
I think that CopyTmpFiles is more recent and is preferred instead of CopyFiles. This is because CopyTmpFiles preserves the copied file whereas CopyFiles automatically deletes it at the end of the test. Preserving the temporary file helps debugging. You only need to copy a file if you are modifying it. If you are treating the test files are read-only then copying is better removed.
By default, exiv2 does not build the sample programs which are used by some of the tests. To fix this, open CMakeLists.txt and set On a side note, unless you need a particular file format, it is better to add files in the 'raw metadata' format ( |
@ postscript-dev Then I had a look into bash_tests/test_exifprint_lint.py. The import there is Regarding exv: So far I could use existing files for the test cases. In my manual tests I executed before committing the changes in easyaccess.cpp, I had to use some RAW files. Adding an exv instead of a RAW file will make huge differenze in size, so for sure I will do it. |
Needs a rebase. |
@ShawnBaker |
Rebasing involves updating your git branch with the new changes that have since been made in exiv2's branch (i.e., If git can rebase automatically, then this is a couple of simple commands. However if not automatic, then an interactive rebase is needed - which is a little more work. You would normally be responsible for rebasing but if you are stuck, then let us know. Usually in your fork of exiv2, you create a new branch (e.g., Exiv2 has some more general information in GIT_GUIDELINES.md. |
I think the merge conflict is because I would probably do this one manually, with a diff-tool like meld. I.e. create two clones of Exiv2. In the first clone, checkout |
@postscript-dev @kevinbackhouse |
Related to issue #2338
For lensmodel the call of findMetadatum is replaced by code based on findMetadatum.
Reason: In all samples I analysed, an image containing Exif.NikonLd4.LensIDNumber also contains Exif.NikonLd4.LensID and vice versa. One of them (sometimes both) has the integer value zero, whereas the other can have a reasonable value. So when looping through the tags, a NikonLd4-tag is skipped, when it's value is zero.
Following keys are added:
Exif.Canon.LensModel
Exif.CanonCs.MaxAperture
Exif.CanonSi.ApertureValue
Exif.MinoltaCs5D.ExposureManualBias
Exif.MinoltaCs5D.MeteringMode
Exif.MinoltaCsNew.MinoltaModel
Exif.MinoltaCsOld.MeteringMode
Exif.MinoltaCsOld.MinoltaModel
Exif.Nikon3.ISOSettings
Exif.NikonLd4.LensID
Exif.NikonLd4.LensIDNumber
Exif.NikonLd4.MaxAperture
Exif.NikonPc.Saturation
Exif.NikonSiD300a.ISO
Exif.Olympus2.Macro
Exif.Olympus2.Quality
Exif.OlympusCs.ExposureMode
Exif.OlympusCs.MeteringMode
Exif.OlympusEq.SerialNumber
Exif.OlympusRd.ExposureBiasValue
Exif.OlympusRd2.ExposureBiasValue
Exif.PanasonicRaw.Make
Exif.PanasonicRaw.Model
Exif.PanasonicRaw.Orientation
Exif.Pentax.ExposureTime
Exif.Pentax.FNumber
Exif.Pentax.Flash
Exif.Pentax.MeteringMode
Exif.Pentax.ModelID
Exif.Pentax.Quality
Exif.Pentax.SerialNumber
Exif.Pentax.WhiteBalance
Exif.PentaxDng.ExposureTime
Exif.PentaxDng.FNumber
Exif.PentaxDng.Flash
Exif.PentaxDng.MeteringMode
Exif.PentaxDng.ModelID
Exif.PentaxDng.Quality
Exif.PentaxDng.SerialNumber
Exif.PentaxDng.WhiteBalance
Exif.Photo.BodySerialNumber
Exif.Sigma.MeteringMode
Exif.Sony1.ExposureMode
Exif.Sony1Cs.MeteringMode
Exif.Sony1Cs2.ExposureProgram
Exif.Sony1Cs2.MeteringMode
Exif.Sony2.ExposureMode
Exif.Sony2.SonyModelID
Exif.Sony2Cs.MeteringMode
Exif.SonyMinolta.Quality
Exif.SonyMisc2b.ExposureProgram
Exif.SonyMisc3c.Quality2