Update Sony(1|2) tags
Transcribe all tags (except for LensID) from main ExifTool Sony group into Exiv2.
Changes include:
- Rename
ColorReproduction->CreativeStyleandLongExposureNoiseReduction->FocusMode3to reflect use. - Rename
0x*tagnames to equivalent ExifTool tags (e.g.,0x2006->Sharpness) - Rename duplicate tagnames (e.g.,
DynamicRangeOptimizer(0xb04f) toDynamicRangeOptimizer2) - Remove tag entries that are Groups (e.g.,
ShotInfo). - Separate some common Sony/Minolta data as the camera types use different values (e.g.,
Quality) - All
exiv2-Sony*.exvand someexiv2_pr2323-coverage*.exvtest files are from ExifTool Sony samples (https://exiftool.org/Sony.tar.gz).
ExifTool Sony tags sources: https://www.exiftool.org/TagNames/Sony.html https://github.com/exiftool/exiftool/blob/1e17485cbb372a502e5b9d052d01303db735e6fa/lib/Image/ExifTool/Sony.pm
Codecov Report
Merging #2323 (7919327) into main (640b0fb) will increase coverage by
0.62%. The diff coverage is82.02%.
@@ Coverage Diff @@
## main #2323 +/- ##
==========================================
+ Coverage 63.51% 64.14% +0.62%
==========================================
Files 119 119
Lines 20634 21099 +465
Branches 10245 10425 +180
==========================================
+ Hits 13106 13534 +428
- Misses 5399 5408 +9
- Partials 2129 2157 +28
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/easyaccess.cpp | 93.10% <ø> (ø) |
|
| src/minoltamn_int.cpp | 60.98% <ø> (+5.92%) |
:arrow_up: |
| src/sonymn_int.cpp | 77.36% <80.56%> (+19.15%) |
:arrow_up: |
| src/tags_int.hpp | 91.17% <93.33%> (+2.80%) |
:arrow_up: |
| src/makernote_int.cpp | 65.39% <0.00%> (+0.76%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
One tag in this PR that may be of interest to darktable developers is ExifTool's Sony LensSpec tag (0xb02a). This is set by compatible lenses and the translated output contains the focal length, aperture and some additional information (e.g., SAM, Fish-eye, etc). Incompatible lenses are translated as Unknown.
To test my PR, I have been using ExifTool's Sony JPEG samples which contain examples of the many different Sony camera types. This sample set includes lots of different lens examples. If I process the files with
$ exiv2 -Pxkvt -K Exif.Sony1.LensID -K Exif.Sony1.LensSpec *.jpg 2>/dev/null > exiv2-LensID_LensSpec_tags.txt
the exiv2-LensID_LensSpec_tags.txt file demonstrates the new tag.
The file shows that LensSpec produces output in circumstances where we don't have translations for LensID. In addition, LensSpec includes values for cameras which have a fixed lens and therefore don't have a LensID tag. For example, my fixed lens Sony DSC-HX60V camera has a LensSpec value of 24-720mm F3.5-6.3 which is also listed as the lens in Sony's PlayMemories Home software.
I wasn't planning to backport everything in this PR but I am willing to work on the LensSpec tag.
Recently it was decided that we can add lenses to exiv2 without a corroborating image, so I looked at adding the ExifTool Sony/Minolta lenses. I formatted the ExifTool lenses into an exiv2 array and can now see that there are lots of differences.
As I don't have enough experience with lenses I don't plan to finish this task. If someone else wants to work on this, the formatted array is available in exiftool_SonyMinolta-lens-in-exiv2-format.txt. You can do a diff with the array in
https://github.com/Exiv2/exiv2/blob/3ac7608282ee28c87e1ee4cfb2f40d6945d389f3/src/minoltamn_int.cpp#L1027-L1030
to find the problems.
@postscript-dev: I made one final suggestion in https://github.com/postscript-dev/exiv2/pull/6 and then I am happy with the code changes. (I'm not qualified to comment on the tag changes because I don't know anything about cameras!)
@kevinbackhouse: Thanks for the suggestion, I have made the changes.
@kevinbackhouse Thanks for taking the time to reviewing this, it was a big PR. As you are not confident about cameras tags, I will leave this for a couple of days to see if anyone else has comments. After that I plan to merge.