From 9541a89b133d3a64c32893a9e0cb98594b8d75fd Mon Sep 17 00:00:00 2001 From: Michael Allman Date: Tue, 15 Feb 2022 16:34:47 -0800 Subject: [PATCH 1/5] Make Exif.NikonAf2.ContrastDetectAFInFocus and Exif.NikonAf22.ContrastDetectAFInFocus byte types --- src/nikonmn_int.cpp | 4 ++-- src/tiffimage_int.cpp | 3 ++- test/data/test_reference_files/CH0_0174.exv.out | 2 +- .../test_reference_files/Sigma_12-24mm_F4_DG_HSM_Art.exv.out | 2 +- .../Sigma_120-300_DG_OS_HSM_Sport_lens.exv.out | 2 +- .../test_reference_files/Sigma_20mm_F1.4_DG_HSM_A.exv.out | 2 +- .../test_reference_files/Sigma_50mm_F1.4_DG_HSM_A.exv.out | 2 +- .../Sigma_APO_MACRO_180_F3.5_EX_DG_HSM.exv.out | 2 +- test/data/test_reference_files/Stonehenge.exv.out | 2 +- .../Tamron_SP70-300_F4-5.6_Di_VC_USD_A030.exv.out | 2 +- .../Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2_0E.exv.out | 2 +- .../Tamron_SP_35mm_f1.4_Di_USD_F045.exv.out | 2 +- .../test_reference_files/Tokina_AT-X_14-20_F2_PRO_DX.exv.out | 2 +- .../test_reference_files/Tokina_ATX-i_11-20mm_F2.8_CF.exv.out | 2 +- .../test_reference_files/Tokina_atx-i_11-16mm_F2.8_CF.exv.out | 2 +- test/data/test_reference_files/_DSC8437.exv.out | 2 +- test/data/test_reference_files/exiv2-bug1014.exv.out | 2 +- test/data/test_reference_files/exiv2-bug1014_2.exv.out | 2 +- test/data/test_reference_files/exiv2-bug1026.jpg.out | 2 +- test/data/test_reference_files/exiv2-bug1062.jpg.out | 2 +- test/data/test_reference_files/exiv2-bug1108.exv.out | 2 +- test/data/test_reference_files/exiv2-bug1108.xmp.out | 2 +- test/data/test_reference_files/exiv2-bug1114.jpg.out | 2 +- test/data/test_reference_files/exiv2-bug1199.webp.out | 2 +- test/data/test_reference_files/exiv2-bug1225.exv.out | 2 +- test/data/test_reference_files/exiv2-bug1348.exv.out | 2 +- test/data/test_reference_files/exiv2-bug922a.jpg.out | 2 +- test/data/test_reference_files/exiv2-issue1208.exv.out | 2 +- test/data/test_reference_files/exiv2-issue1941-1.exv.out | 2 +- test/data/test_reference_files/exiv2-pr1105.exv.out | 2 +- test/data/test_reference_files/issue_1934_poc1.exv.out | 2 +- test/data/test_reference_files/issue_743.exv.out | 2 +- .../issue_ghsa_5p8g_9xf3_gfrr_poc.exv.out | 2 +- .../issue_ghsa_5p8g_9xf3_gfrr_poc.webp.out | 2 +- test/data/test_reference_files/pr_1994_poc1.jpg.out | 2 +- test/data/test_reference_files/pr_1994_poc2.jpg.out | 2 +- test/data/test_reference_files/test_issue_990.exv.out | 2 +- tests/bugfixes/github/test_issue_646.py | 2 +- 38 files changed, 40 insertions(+), 39 deletions(-) diff --git a/src/nikonmn_int.cpp b/src/nikonmn_int.cpp index b5da7e8b..48b90876 100644 --- a/src/nikonmn_int.cpp +++ b/src/nikonmn_int.cpp @@ -904,7 +904,7 @@ namespace Exiv2 { { 22, "AFAreaYPosition", N_("AF Area Y Position"), N_("AF area y position"), nikonAf21Id, makerTags, unsignedShort, 1, printValue}, { 24, "AFAreaWidth", N_("AF Area Width"), N_("AF area width"), nikonAf21Id, makerTags, unsignedShort, 1, printValue}, { 26, "AFAreaHeight", N_("AF Area Height"), N_("AF area height"), nikonAf21Id, makerTags, unsignedShort, 1, printValue}, - { 28, "ContrastDetectAFInFocus", N_("Contrast Detect AF In Focus"), N_("Contrast detect AF in focus"), nikonAf21Id, makerTags, unsignedShort, 1, printValue}, + { 28, "ContrastDetectAFInFocus", N_("Contrast Detect AF In Focus"), N_("Contrast detect AF in focus"), nikonAf21Id, makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonOffOn)}, // End of list marker {0xffff, "(UnknownNikonAf2Tag)", "(UnknownNikonAf2Tag)", N_("Unknown Nikon Auto Focus 2 Tag"), nikonAf21Id, makerTags, unsignedByte, 1, printValue}, }; @@ -928,7 +928,7 @@ namespace Exiv2 { { 76, "AFAreaYPosition", N_("AF Area Y Position"), N_("AF area y position"), nikonAf22Id, makerTags, unsignedShort, 1, printValue}, { 78, "AFAreaWidth", N_("AF Area Width"), N_("AF area width"), nikonAf22Id, makerTags, unsignedShort, 1, printValue}, { 80, "AFAreaHeight", N_("AF Area Height"), N_("AF area height"), nikonAf22Id, makerTags, unsignedShort, 1, printValue}, - { 82, "ContrastDetectAFInFocus", N_("Contrast Detect AF In Focus"), N_("Contrast detect AF in focus"), nikonAf22Id, makerTags, unsignedShort, 1, printValue}, + { 82, "ContrastDetectAFInFocus", N_("Contrast Detect AF In Focus"), N_("Contrast detect AF in focus"), nikonAf22Id, makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonOffOn)}, // End of list marker {0xffff, "(UnknownNikonAf2Tag)", "(UnknownNikonAf2Tag)", N_("Unknown Nikon Auto Focus 2 Tag"), nikonAf22Id, makerTags, unsignedByte, 1, printValue}, }; diff --git a/src/tiffimage_int.cpp b/src/tiffimage_int.cpp index 36849be7..92bd74e6 100644 --- a/src/tiffimage_int.cpp +++ b/src/tiffimage_int.cpp @@ -399,7 +399,7 @@ namespace Exiv2 { { 22, ttUnsignedShort, 1 }, // AFAreaYPosition { 24, ttUnsignedShort, 1 }, // AFAreaWidth { 26, ttUnsignedShort, 1 }, // AFAreaHeight - { 28, ttUnsignedShort, 1 }, // ContrastDetectAFInFocus + { 28, ttUnsignedByte, 1 }, // ContrastDetectAFInFocus }; //! Nikon Auto Focus 22 binary array - configuration constexpr ArrayCfg nikonAf22Cfg = { @@ -426,6 +426,7 @@ namespace Exiv2 { { 76, ttUnsignedShort, 1 }, // AFAreaYPosition { 78, ttUnsignedShort, 1 }, // AFAreaWidth { 80, ttUnsignedShort, 1 }, // AFAreaHeight + { 82, ttUnsignedByte, 1 }, // ContrastDetectAFInFocus }; //! Nikon AF2 configuration and definitions diff --git a/test/data/test_reference_files/CH0_0174.exv.out b/test/data/test_reference_files/CH0_0174.exv.out index 3d64bebc..1358f7cb 100644 --- a/test/data/test_reference_files/CH0_0174.exv.out +++ b/test/data/test_reference_files/CH0_0174.exv.out @@ -152,7 +152,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 174 174 diff --git a/test/data/test_reference_files/Sigma_12-24mm_F4_DG_HSM_Art.exv.out b/test/data/test_reference_files/Sigma_12-24mm_F4_DG_HSM_Art.exv.out index fcccaea7..9337d38c 100644 --- a/test/data/test_reference_files/Sigma_12-24mm_F4_DG_HSM_Art.exv.out +++ b/test/data/test_reference_files/Sigma_12-24mm_F4_DG_HSM_Art.exv.out @@ -148,7 +148,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 5057 5057 Exif.NikonAf22.AFAreaYPosition Short 1 2304 2304 Exif.NikonAf22.AFAreaWidth Short 1 870 870 Exif.NikonAf22.AFAreaHeight Short 1 729 729 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 2 0 0 0 0 +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 112 112 Exif.NikonFi.FileNumber Short 1 4925 4925 diff --git a/test/data/test_reference_files/Sigma_120-300_DG_OS_HSM_Sport_lens.exv.out b/test/data/test_reference_files/Sigma_120-300_DG_OS_HSM_Sport_lens.exv.out index 5bc1ad29..b5784a10 100644 --- a/test/data/test_reference_files/Sigma_120-300_DG_OS_HSM_Sport_lens.exv.out +++ b/test/data/test_reference_files/Sigma_120-300_DG_OS_HSM_Sport_lens.exv.out @@ -148,7 +148,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 0 0 Exif.NikonAf22.AFAreaYPosition Short 1 0 0 Exif.NikonAf22.AFAreaWidth Short 1 0 0 Exif.NikonAf22.AFAreaHeight Short 1 0 0 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 2 0 0 0 0 +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 246 246 diff --git a/test/data/test_reference_files/Sigma_20mm_F1.4_DG_HSM_A.exv.out b/test/data/test_reference_files/Sigma_20mm_F1.4_DG_HSM_A.exv.out index cc2daa05..df4c2614 100644 --- a/test/data/test_reference_files/Sigma_20mm_F1.4_DG_HSM_A.exv.out +++ b/test/data/test_reference_files/Sigma_20mm_F1.4_DG_HSM_A.exv.out @@ -147,7 +147,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 105 105 Exif.NikonFi.FileNumber Short 1 2057 2057 diff --git a/test/data/test_reference_files/Sigma_50mm_F1.4_DG_HSM_A.exv.out b/test/data/test_reference_files/Sigma_50mm_F1.4_DG_HSM_A.exv.out index caf6028e..1b705327 100644 --- a/test/data/test_reference_files/Sigma_50mm_F1.4_DG_HSM_A.exv.out +++ b/test/data/test_reference_files/Sigma_50mm_F1.4_DG_HSM_A.exv.out @@ -147,7 +147,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 105 105 Exif.NikonFi.FileNumber Short 1 2059 2059 diff --git a/test/data/test_reference_files/Sigma_APO_MACRO_180_F3.5_EX_DG_HSM.exv.out b/test/data/test_reference_files/Sigma_APO_MACRO_180_F3.5_EX_DG_HSM.exv.out index 1c290e33..6c9b8e96 100644 --- a/test/data/test_reference_files/Sigma_APO_MACRO_180_F3.5_EX_DG_HSM.exv.out +++ b/test/data/test_reference_files/Sigma_APO_MACRO_180_F3.5_EX_DG_HSM.exv.out @@ -146,7 +146,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 825 825 diff --git a/test/data/test_reference_files/Stonehenge.exv.out b/test/data/test_reference_files/Stonehenge.exv.out index 22be23de..1560f88c 100644 --- a/test/data/test_reference_files/Stonehenge.exv.out +++ b/test/data/test_reference_files/Stonehenge.exv.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 7154 7154 diff --git a/test/data/test_reference_files/Tamron_SP70-300_F4-5.6_Di_VC_USD_A030.exv.out b/test/data/test_reference_files/Tamron_SP70-300_F4-5.6_Di_VC_USD_A030.exv.out index 7a436c84..bd0acedb 100644 --- a/test/data/test_reference_files/Tamron_SP70-300_F4-5.6_Di_VC_USD_A030.exv.out +++ b/test/data/test_reference_files/Tamron_SP70-300_F4-5.6_Di_VC_USD_A030.exv.out @@ -140,7 +140,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 69 69 diff --git a/test/data/test_reference_files/Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2_0E.exv.out b/test/data/test_reference_files/Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2_0E.exv.out index e736f118..179bf2c0 100644 --- a/test/data/test_reference_files/Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2_0E.exv.out +++ b/test/data/test_reference_files/Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2_0E.exv.out @@ -140,7 +140,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 102 102 Exif.NikonFi.FileNumber Short 1 9850 9850 diff --git a/test/data/test_reference_files/Tamron_SP_35mm_f1.4_Di_USD_F045.exv.out b/test/data/test_reference_files/Tamron_SP_35mm_f1.4_Di_USD_F045.exv.out index 454d1fed..bd202951 100644 --- a/test/data/test_reference_files/Tamron_SP_35mm_f1.4_Di_USD_F045.exv.out +++ b/test/data/test_reference_files/Tamron_SP_35mm_f1.4_Di_USD_F045.exv.out @@ -145,7 +145,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 0 0 Exif.NikonAf22.AFAreaYPosition Short 1 0 0 Exif.NikonAf22.AFAreaWidth Short 1 0 0 Exif.NikonAf22.AFAreaHeight Short 1 0 0 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 2 0 0 0 0 +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 129 129 Exif.NikonFi.FileNumber Short 1 495 495 diff --git a/test/data/test_reference_files/Tokina_AT-X_14-20_F2_PRO_DX.exv.out b/test/data/test_reference_files/Tokina_AT-X_14-20_F2_PRO_DX.exv.out index 43a4d0bb..01c86a09 100644 --- a/test/data/test_reference_files/Tokina_AT-X_14-20_F2_PRO_DX.exv.out +++ b/test/data/test_reference_files/Tokina_AT-X_14-20_F2_PRO_DX.exv.out @@ -147,7 +147,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 5296 5296 Exif.NikonAf2.AFAreaYPosition Short 1 2528 2528 Exif.NikonAf2.AFAreaWidth Short 1 984 984 Exif.NikonAf2.AFAreaHeight Short 1 816 816 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 1 1 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 1 On Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 109 109 Exif.NikonFi.FileNumber Short 1 135 135 diff --git a/test/data/test_reference_files/Tokina_ATX-i_11-20mm_F2.8_CF.exv.out b/test/data/test_reference_files/Tokina_ATX-i_11-20mm_F2.8_CF.exv.out index 4e2cf7c3..35407dfa 100644 --- a/test/data/test_reference_files/Tokina_ATX-i_11-20mm_F2.8_CF.exv.out +++ b/test/data/test_reference_files/Tokina_ATX-i_11-20mm_F2.8_CF.exv.out @@ -130,7 +130,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 1848 1848 diff --git a/test/data/test_reference_files/Tokina_atx-i_11-16mm_F2.8_CF.exv.out b/test/data/test_reference_files/Tokina_atx-i_11-16mm_F2.8_CF.exv.out index 4a4ab1ac..c650e8b1 100644 --- a/test/data/test_reference_files/Tokina_atx-i_11-16mm_F2.8_CF.exv.out +++ b/test/data/test_reference_files/Tokina_atx-i_11-16mm_F2.8_CF.exv.out @@ -141,7 +141,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 0 0 Exif.NikonAf22.AFAreaYPosition Short 1 0 0 Exif.NikonAf22.AFAreaWidth Short 1 0 0 Exif.NikonAf22.AFAreaHeight Short 1 0 0 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 2 0 0 0 0 +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 104 104 Exif.NikonFi.FileNumber Short 1 476 476 diff --git a/test/data/test_reference_files/_DSC8437.exv.out b/test/data/test_reference_files/_DSC8437.exv.out index b203aee7..9e7975e9 100644 --- a/test/data/test_reference_files/_DSC8437.exv.out +++ b/test/data/test_reference_files/_DSC8437.exv.out @@ -151,7 +151,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 3950 3950 Exif.NikonAf22.AFAreaYPosition Short 1 2871 2871 Exif.NikonAf22.AFAreaWidth Short 1 435 435 Exif.NikonAf22.AFAreaHeight Short 1 360 360 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 2 1 0 1 0 +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 1 On Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 8437 8437 diff --git a/test/data/test_reference_files/exiv2-bug1014.exv.out b/test/data/test_reference_files/exiv2-bug1014.exv.out index 4374214e..b0d78b2a 100644 --- a/test/data/test_reference_files/exiv2-bug1014.exv.out +++ b/test/data/test_reference_files/exiv2-bug1014.exv.out @@ -139,7 +139,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 3 3 diff --git a/test/data/test_reference_files/exiv2-bug1014_2.exv.out b/test/data/test_reference_files/exiv2-bug1014_2.exv.out index bc3af33d..f6a8aed7 100644 --- a/test/data/test_reference_files/exiv2-bug1014_2.exv.out +++ b/test/data/test_reference_files/exiv2-bug1014_2.exv.out @@ -145,7 +145,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 161 161 diff --git a/test/data/test_reference_files/exiv2-bug1026.jpg.out b/test/data/test_reference_files/exiv2-bug1026.jpg.out index a7ab4593..062c30ea 100644 --- a/test/data/test_reference_files/exiv2-bug1026.jpg.out +++ b/test/data/test_reference_files/exiv2-bug1026.jpg.out @@ -134,7 +134,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 103 103 Exif.NikonFi.FileNumber Short 1 3811 3811 diff --git a/test/data/test_reference_files/exiv2-bug1062.jpg.out b/test/data/test_reference_files/exiv2-bug1062.jpg.out index 0a9b0f08..c081dc18 100644 --- a/test/data/test_reference_files/exiv2-bug1062.jpg.out +++ b/test/data/test_reference_files/exiv2-bug1062.jpg.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 5900 5900 diff --git a/test/data/test_reference_files/exiv2-bug1108.exv.out b/test/data/test_reference_files/exiv2-bug1108.exv.out index 22be23de..1560f88c 100644 --- a/test/data/test_reference_files/exiv2-bug1108.exv.out +++ b/test/data/test_reference_files/exiv2-bug1108.exv.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 7154 7154 diff --git a/test/data/test_reference_files/exiv2-bug1108.xmp.out b/test/data/test_reference_files/exiv2-bug1108.xmp.out index 22be23de..1560f88c 100644 --- a/test/data/test_reference_files/exiv2-bug1108.xmp.out +++ b/test/data/test_reference_files/exiv2-bug1108.xmp.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 7154 7154 diff --git a/test/data/test_reference_files/exiv2-bug1114.jpg.out b/test/data/test_reference_files/exiv2-bug1114.jpg.out index faba6a87..7956bd50 100644 --- a/test/data/test_reference_files/exiv2-bug1114.jpg.out +++ b/test/data/test_reference_files/exiv2-bug1114.jpg.out @@ -143,7 +143,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 1147 1147 diff --git a/test/data/test_reference_files/exiv2-bug1199.webp.out b/test/data/test_reference_files/exiv2-bug1199.webp.out index ce296def..2b35ac78 100644 --- a/test/data/test_reference_files/exiv2-bug1199.webp.out +++ b/test/data/test_reference_files/exiv2-bug1199.webp.out @@ -78,7 +78,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonCb2b.Version Undefined 4 48 50 49 57 2.19 Exif.NikonCb2b.WB_RGGBLevels Short 4 7396 31796 21644 7380 7396 31796 21644 7380 Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 diff --git a/test/data/test_reference_files/exiv2-bug1225.exv.out b/test/data/test_reference_files/exiv2-bug1225.exv.out index d1d1c547..baf28050 100644 --- a/test/data/test_reference_files/exiv2-bug1225.exv.out +++ b/test/data/test_reference_files/exiv2-bug1225.exv.out @@ -101,7 +101,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 768 768 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonAFT.AFFineTune Byte 1 0 Off Exif.NikonAFT.AFFineTuneIndex Byte 1 255 255 Exif.NikonAFT.AFFineTuneAdj SByte 1 0 0 diff --git a/test/data/test_reference_files/exiv2-bug1348.exv.out b/test/data/test_reference_files/exiv2-bug1348.exv.out index b9c58fde..fbb5fd62 100644 --- a/test/data/test_reference_files/exiv2-bug1348.exv.out +++ b/test/data/test_reference_files/exiv2-bug1348.exv.out @@ -90,7 +90,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 120 120 Exif.NikonFi.FileNumber Short 1 939 939 diff --git a/test/data/test_reference_files/exiv2-bug922a.jpg.out b/test/data/test_reference_files/exiv2-bug922a.jpg.out index 1eec23d3..9602615c 100644 --- a/test/data/test_reference_files/exiv2-bug922a.jpg.out +++ b/test/data/test_reference_files/exiv2-bug922a.jpg.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 5900 5900 diff --git a/test/data/test_reference_files/exiv2-issue1208.exv.out b/test/data/test_reference_files/exiv2-issue1208.exv.out index 48e5144c..77379f31 100644 --- a/test/data/test_reference_files/exiv2-issue1208.exv.out +++ b/test/data/test_reference_files/exiv2-issue1208.exv.out @@ -151,7 +151,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 0 0 Exif.NikonAf22.AFAreaYPosition Short 1 0 0 Exif.NikonAf22.AFAreaWidth Short 1 0 0 Exif.NikonAf22.AFAreaHeight Short 1 0 0 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 2 0 0 0 0 +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 110 110 Exif.NikonFi.FileNumber Short 1 6176 6176 diff --git a/test/data/test_reference_files/exiv2-issue1941-1.exv.out b/test/data/test_reference_files/exiv2-issue1941-1.exv.out index f2ca5976..921da521 100644 --- a/test/data/test_reference_files/exiv2-issue1941-1.exv.out +++ b/test/data/test_reference_files/exiv2-issue1941-1.exv.out @@ -151,7 +151,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 0 0 Exif.NikonAf22.AFAreaYPosition Short 1 0 0 Exif.NikonAf22.AFAreaWidth Short 1 0 0 Exif.NikonAf22.AFAreaHeight Short 1 0 0 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 2 0 0 0 0 +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 6115 6115 diff --git a/test/data/test_reference_files/exiv2-pr1105.exv.out b/test/data/test_reference_files/exiv2-pr1105.exv.out index 4f02e744..a367497b 100644 --- a/test/data/test_reference_files/exiv2-pr1105.exv.out +++ b/test/data/test_reference_files/exiv2-pr1105.exv.out @@ -146,7 +146,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 307 307 Exif.NikonFi.FileNumber Short 1 1727 1727 diff --git a/test/data/test_reference_files/issue_1934_poc1.exv.out b/test/data/test_reference_files/issue_1934_poc1.exv.out index 22be23de..1560f88c 100644 --- a/test/data/test_reference_files/issue_1934_poc1.exv.out +++ b/test/data/test_reference_files/issue_1934_poc1.exv.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 7154 7154 diff --git a/test/data/test_reference_files/issue_743.exv.out b/test/data/test_reference_files/issue_743.exv.out index d81b1ee7..23f1c152 100644 --- a/test/data/test_reference_files/issue_743.exv.out +++ b/test/data/test_reference_files/issue_743.exv.out @@ -140,7 +140,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 106 106 Exif.NikonFi.FileNumber Short 1 5190 5190 diff --git a/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.exv.out b/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.exv.out index a2d8b909..17d087ec 100644 --- a/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.exv.out +++ b/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.exv.out @@ -79,7 +79,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonCb2b.Version Undefined 4 48 50 49 57 2.19 Exif.NikonCb2b.WB_RGGBLevels Short 4 7396 31796 21644 7380 7396 31796 21644 7380 Exif.NikonFi.Version Undefined 4 0 0 0 0 () diff --git a/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.webp.out b/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.webp.out index a2d8b909..17d087ec 100644 --- a/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.webp.out +++ b/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.webp.out @@ -79,7 +79,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonCb2b.Version Undefined 4 48 50 49 57 2.19 Exif.NikonCb2b.WB_RGGBLevels Short 4 7396 31796 21644 7380 7396 31796 21644 7380 Exif.NikonFi.Version Undefined 4 0 0 0 0 () diff --git a/test/data/test_reference_files/pr_1994_poc1.jpg.out b/test/data/test_reference_files/pr_1994_poc1.jpg.out index 9c58943a..657fa2a6 100644 --- a/test/data/test_reference_files/pr_1994_poc1.jpg.out +++ b/test/data/test_reference_files/pr_1994_poc1.jpg.out @@ -143,7 +143,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 423 423 diff --git a/test/data/test_reference_files/pr_1994_poc2.jpg.out b/test/data/test_reference_files/pr_1994_poc2.jpg.out index ad82b70e..eb2149fb 100644 --- a/test/data/test_reference_files/pr_1994_poc2.jpg.out +++ b/test/data/test_reference_files/pr_1994_poc2.jpg.out @@ -143,7 +143,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 200 200 Exif.NikonFi.FileNumber Short 1 4345 4345 diff --git a/test/data/test_reference_files/test_issue_990.exv.out b/test/data/test_reference_files/test_issue_990.exv.out index c10f64f9..96f0f59f 100644 --- a/test/data/test_reference_files/test_issue_990.exv.out +++ b/test/data/test_reference_files/test_issue_990.exv.out @@ -146,7 +146,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Short 1 0 0 +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 281 281 Exif.NikonFi.FileNumber Short 1 7965 7965 diff --git a/tests/bugfixes/github/test_issue_646.py b/tests/bugfixes/github/test_issue_646.py index 854fb5d0..4499b51d 100644 --- a/tests/bugfixes/github/test_issue_646.py +++ b/tests/bugfixes/github/test_issue_646.py @@ -22,7 +22,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 3950 Exif.NikonAf22.AFAreaYPosition Short 1 2871 Exif.NikonAf22.AFAreaWidth Short 1 435 Exif.NikonAf22.AFAreaHeight Short 1 360 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 2 1 0 +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 On """ ] stderr = [ "" ] * len(commands) From cd28e79da0383792666ff48faff197b48ccd66ee Mon Sep 17 00:00:00 2001 From: Michael Allman Date: Fri, 18 Feb 2022 16:33:42 -0800 Subject: [PATCH 2/5] Add autogenerated documentation for NikonAf22 tags to html docs --- doc/templates/Makefile | 1 + doc/templates/tags-nikon.html.in | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/doc/templates/Makefile b/doc/templates/Makefile index da555e78..27d368a7 100644 --- a/doc/templates/Makefile +++ b/doc/templates/Makefile @@ -80,6 +80,7 @@ TABLES = Exif \ NikonIi \ NikonAf \ NikonAf2 \ + NikonAf22 \ NikonAFT \ NikonFi \ NikonMe \ diff --git a/doc/templates/tags-nikon.html.in b/doc/templates/tags-nikon.html.in index 4f2ec5fd..1ab1945d 100644 --- a/doc/templates/tags-nikon.html.in +++ b/doc/templates/tags-nikon.html.in @@ -61,6 +61,11 @@ __NikonAf__ __NikonAf2__
+

Nikon Auto Focus 2 V2 Tags

+

Click on a column header to sort the table.

+__NikonAf22__ +
+

Nikon AF Fine Tune Tags

Click on a column header to sort the table.

__NikonAFT__ From a3e2410b88d93faaa3bdccf9043d2155e3975596 Mon Sep 17 00:00:00 2001 From: Michael Allman Date: Sat, 19 Feb 2022 15:47:02 -0800 Subject: [PATCH 3/5] Print value of ContrastDetectAFInFocus as Yes/No. Change internal selection logic for NikonAf2* from tag data length to group version --- src/makernote_int.cpp | 12 +++--------- src/makernote_int.hpp | 11 ----------- src/nikonmn_int.cpp | 6 +++--- src/tiffimage_int.cpp | 2 +- test/data/test_reference_files/CH0_0174.exv.out | 14 +------------- .../Sigma_12-24mm_F4_DG_HSM_Art.exv.out | 2 +- .../Sigma_120-300_DG_OS_HSM_Sport_lens.exv.out | 2 +- .../Sigma_20mm_F1.4_DG_HSM_A.exv.out | 2 +- .../Sigma_50mm_F1.4_DG_HSM_A.exv.out | 2 +- .../Sigma_APO_MACRO_180_F3.5_EX_DG_HSM.exv.out | 2 +- test/data/test_reference_files/Stonehenge.exv.out | 2 +- .../Tamron_SP70-300_F4-5.6_Di_VC_USD_A030.exv.out | 2 +- .../Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2_0E.exv.out | 2 +- .../Tamron_SP_35mm_f1.4_Di_USD_F045.exv.out | 2 +- .../Tokina_AT-X_14-20_F2_PRO_DX.exv.out | 2 +- .../Tokina_ATX-i_11-20mm_F2.8_CF.exv.out | 2 +- .../Tokina_atx-i_11-16mm_F2.8_CF.exv.out | 2 +- test/data/test_reference_files/_DSC8437.exv.out | 2 +- .../test_reference_files/exiv2-bug1014.exv.out | 2 +- .../test_reference_files/exiv2-bug1014_2.exv.out | 2 +- .../test_reference_files/exiv2-bug1026.jpg.out | 2 +- .../test_reference_files/exiv2-bug1062.jpg.out | 2 +- .../test_reference_files/exiv2-bug1108.exv.out | 2 +- .../test_reference_files/exiv2-bug1108.xmp.out | 2 +- .../test_reference_files/exiv2-bug1114.jpg.out | 2 +- .../test_reference_files/exiv2-bug1199.webp.out | 2 +- .../test_reference_files/exiv2-bug1225.exv.out | 14 +------------- .../test_reference_files/exiv2-bug1348.exv.out | 2 +- .../test_reference_files/exiv2-bug922a.jpg.out | 2 +- .../test_reference_files/exiv2-issue1208.exv.out | 2 +- .../test_reference_files/exiv2-issue1941-1.exv.out | 2 +- .../data/test_reference_files/exiv2-pr1105.exv.out | 2 +- .../test_reference_files/issue_1934_poc1.exv.out | 2 +- test/data/test_reference_files/issue_743.exv.out | 2 +- .../issue_ghsa_5p8g_9xf3_gfrr_poc.exv.out | 2 +- .../issue_ghsa_5p8g_9xf3_gfrr_poc.webp.out | 2 +- .../data/test_reference_files/pr_1994_poc1.jpg.out | 2 +- .../data/test_reference_files/pr_1994_poc2.jpg.out | 2 +- .../test_reference_files/test_issue_990.exv.out | 2 +- tests/bugfixes/github/test_issue_646.py | 2 +- 40 files changed, 43 insertions(+), 84 deletions(-) diff --git a/src/makernote_int.cpp b/src/makernote_int.cpp index 5863eb01..56e2bbd2 100644 --- a/src/makernote_int.cpp +++ b/src/makernote_int.cpp @@ -1142,6 +1142,9 @@ namespace Exiv2 { { 0x00a8, "0105", 0, 2, NA }, { 0x00a8, "0107", 0, 3, NA }, { 0x00a8, "0108", 0, 3, NA }, + // NikonAf + { 0x00b7, "0100", 0, 0, NA }, + { 0x00b7, "0101", 0, 1, NA }, }; int nikonSelector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const /*pRoot*/) @@ -1151,15 +1154,6 @@ namespace Exiv2 { return aix == nullptr ? -1 : aix->idx_; } - int nikonAf2Selector(uint16_t tag, const byte* /*pData*/, uint32_t size, TiffComponent* const /*pRoot*/) - { - int result = tag == 0x00b7 ? 0 : -1 ; - if (result > -1 && size == 84 ) { - result = 1; - } - return result; - } - DataBuf nikonCrypt(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot) { DataBuf buf; diff --git a/src/makernote_int.hpp b/src/makernote_int.hpp index df8a1ebd..b83665e0 100644 --- a/src/makernote_int.hpp +++ b/src/makernote_int.hpp @@ -751,17 +751,6 @@ namespace Exiv2 { */ int nikonSelector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot); - /*! - @brief Function to select cfg + def of a Nikon complex binary array. - - @param tag Tag number of the binary array - @param pData Pointer to the raw array data. - @param size Size of the array data. - @param pRoot Pointer to the root component of the TIFF tree. - @return An index into the array set, -1 if no match was found. - */ - int nikonAf2Selector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const pRoot); - /*! @brief Encrypt and decrypt Nikon data. diff --git a/src/nikonmn_int.cpp b/src/nikonmn_int.cpp index 48b90876..ca05c116 100644 --- a/src/nikonmn_int.cpp +++ b/src/nikonmn_int.cpp @@ -657,7 +657,7 @@ namespace Exiv2 { return tagInfo_; } - //! YesNo, used for DaylightSavings, tag index 2 + //! YesNo, used for DaylightSavings, tag index 2, et al. constexpr TagDetails nikonYesNo[] = { { 0, N_("No") }, { 1, N_("Yes") } @@ -904,7 +904,7 @@ namespace Exiv2 { { 22, "AFAreaYPosition", N_("AF Area Y Position"), N_("AF area y position"), nikonAf21Id, makerTags, unsignedShort, 1, printValue}, { 24, "AFAreaWidth", N_("AF Area Width"), N_("AF area width"), nikonAf21Id, makerTags, unsignedShort, 1, printValue}, { 26, "AFAreaHeight", N_("AF Area Height"), N_("AF area height"), nikonAf21Id, makerTags, unsignedShort, 1, printValue}, - { 28, "ContrastDetectAFInFocus", N_("Contrast Detect AF In Focus"), N_("Contrast detect AF in focus"), nikonAf21Id, makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonOffOn)}, + { 28, "ContrastDetectAFInFocus", N_("Contrast Detect AF In Focus"), N_("Contrast detect AF in focus"), nikonAf21Id, makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonYesNo)}, // End of list marker {0xffff, "(UnknownNikonAf2Tag)", "(UnknownNikonAf2Tag)", N_("Unknown Nikon Auto Focus 2 Tag"), nikonAf21Id, makerTags, unsignedByte, 1, printValue}, }; @@ -928,7 +928,7 @@ namespace Exiv2 { { 76, "AFAreaYPosition", N_("AF Area Y Position"), N_("AF area y position"), nikonAf22Id, makerTags, unsignedShort, 1, printValue}, { 78, "AFAreaWidth", N_("AF Area Width"), N_("AF area width"), nikonAf22Id, makerTags, unsignedShort, 1, printValue}, { 80, "AFAreaHeight", N_("AF Area Height"), N_("AF area height"), nikonAf22Id, makerTags, unsignedShort, 1, printValue}, - { 82, "ContrastDetectAFInFocus", N_("Contrast Detect AF In Focus"), N_("Contrast detect AF in focus"), nikonAf22Id, makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonOffOn)}, + { 82, "ContrastDetectAFInFocus", N_("Contrast Detect AF In Focus"), N_("Contrast detect AF in focus"), nikonAf22Id, makerTags, unsignedByte, 1, EXV_PRINT_TAG(nikonYesNo)}, // End of list marker {0xffff, "(UnknownNikonAf2Tag)", "(UnknownNikonAf2Tag)", N_("Unknown Nikon Auto Focus 2 Tag"), nikonAf22Id, makerTags, unsignedByte, 1, printValue}, }; diff --git a/src/tiffimage_int.cpp b/src/tiffimage_int.cpp index 92bd74e6..3b21af24 100644 --- a/src/tiffimage_int.cpp +++ b/src/tiffimage_int.cpp @@ -1731,7 +1731,7 @@ namespace Exiv2 { { 0x0098, nikon3Id, EXV_COMPLEX_BINARY_ARRAY(nikonLdSet, nikonSelector) }, { 0x00a8, nikon3Id, EXV_COMPLEX_BINARY_ARRAY(nikonFlSet, nikonSelector) }, { 0x00b0, nikon3Id, EXV_BINARY_ARRAY(nikonMeCfg, nikonMeDef) }, - { 0x00b7, nikon3Id, EXV_COMPLEX_BINARY_ARRAY(nikonAf2Set, nikonAf2Selector) }, + { 0x00b7, nikon3Id, EXV_COMPLEX_BINARY_ARRAY(nikonAf2Set, nikonSelector) }, { 0x00b8, nikon3Id, EXV_BINARY_ARRAY(nikonFiCfg, nikonFiDef) }, { 0x00b9, nikon3Id, EXV_BINARY_ARRAY(nikonAFTCfg, nikonAFTDef) }, { Tag::all, nikon3Id, newTiffEntry }, diff --git a/test/data/test_reference_files/CH0_0174.exv.out b/test/data/test_reference_files/CH0_0174.exv.out index 1358f7cb..07d810c4 100644 --- a/test/data/test_reference_files/CH0_0174.exv.out +++ b/test/data/test_reference_files/CH0_0174.exv.out @@ -140,19 +140,7 @@ Exif.NikonMe.MultiExposureMode Long 1 0 Off Exif.NikonMe.MultiExposureShots Long 1 0 0 Exif.NikonMe.MultiExposureAutoGain Long 1 0 Off Exif.Nikon3.HighISONoiseReduction Short 1 4 Normal -Exif.NikonAf2.Version Undefined 4 48 51 48 48 3.00 -Exif.NikonAf2.ContrastDetectAF Byte 1 1 On -Exif.NikonAf2.AFAreaMode Byte 1 193 193 -Exif.NikonAf2.PhaseDetectAF Byte 1 0 Off -Exif.NikonAf2.PrimaryAFPoint Byte 1 1 1 -Exif.NikonAf2.AFPointsUsed Byte 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -Exif.NikonAf2.AFImageWidth Short 1 0 0 -Exif.NikonAf2.AFImageHeight Short 1 0 0 -Exif.NikonAf2.AFAreaXPosition Short 1 0 0 -Exif.NikonAf2.AFAreaYPosition Short 1 0 0 -Exif.NikonAf2.AFAreaWidth Short 1 0 0 -Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.Nikon3.AFInfo2 Undefined 60 48 51 48 48 1 193 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 160 23 184 15 208 11 220 7 29 1 52 1 0 0 0 0 0 0 48 51 48 48 1 193 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 160 23 184 15 208 11 220 7 29 1 52 1 0 0 0 0 0 0 Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 174 174 diff --git a/test/data/test_reference_files/Sigma_12-24mm_F4_DG_HSM_Art.exv.out b/test/data/test_reference_files/Sigma_12-24mm_F4_DG_HSM_Art.exv.out index 9337d38c..a118a3f1 100644 --- a/test/data/test_reference_files/Sigma_12-24mm_F4_DG_HSM_Art.exv.out +++ b/test/data/test_reference_files/Sigma_12-24mm_F4_DG_HSM_Art.exv.out @@ -148,7 +148,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 5057 5057 Exif.NikonAf22.AFAreaYPosition Short 1 2304 2304 Exif.NikonAf22.AFAreaWidth Short 1 870 870 Exif.NikonAf22.AFAreaHeight Short 1 729 729 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 112 112 Exif.NikonFi.FileNumber Short 1 4925 4925 diff --git a/test/data/test_reference_files/Sigma_120-300_DG_OS_HSM_Sport_lens.exv.out b/test/data/test_reference_files/Sigma_120-300_DG_OS_HSM_Sport_lens.exv.out index b5784a10..384208e3 100644 --- a/test/data/test_reference_files/Sigma_120-300_DG_OS_HSM_Sport_lens.exv.out +++ b/test/data/test_reference_files/Sigma_120-300_DG_OS_HSM_Sport_lens.exv.out @@ -148,7 +148,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 0 0 Exif.NikonAf22.AFAreaYPosition Short 1 0 0 Exif.NikonAf22.AFAreaWidth Short 1 0 0 Exif.NikonAf22.AFAreaHeight Short 1 0 0 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 246 246 diff --git a/test/data/test_reference_files/Sigma_20mm_F1.4_DG_HSM_A.exv.out b/test/data/test_reference_files/Sigma_20mm_F1.4_DG_HSM_A.exv.out index df4c2614..6e1c8244 100644 --- a/test/data/test_reference_files/Sigma_20mm_F1.4_DG_HSM_A.exv.out +++ b/test/data/test_reference_files/Sigma_20mm_F1.4_DG_HSM_A.exv.out @@ -147,7 +147,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 105 105 Exif.NikonFi.FileNumber Short 1 2057 2057 diff --git a/test/data/test_reference_files/Sigma_50mm_F1.4_DG_HSM_A.exv.out b/test/data/test_reference_files/Sigma_50mm_F1.4_DG_HSM_A.exv.out index 1b705327..b04087f7 100644 --- a/test/data/test_reference_files/Sigma_50mm_F1.4_DG_HSM_A.exv.out +++ b/test/data/test_reference_files/Sigma_50mm_F1.4_DG_HSM_A.exv.out @@ -147,7 +147,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 105 105 Exif.NikonFi.FileNumber Short 1 2059 2059 diff --git a/test/data/test_reference_files/Sigma_APO_MACRO_180_F3.5_EX_DG_HSM.exv.out b/test/data/test_reference_files/Sigma_APO_MACRO_180_F3.5_EX_DG_HSM.exv.out index 6c9b8e96..649f67b2 100644 --- a/test/data/test_reference_files/Sigma_APO_MACRO_180_F3.5_EX_DG_HSM.exv.out +++ b/test/data/test_reference_files/Sigma_APO_MACRO_180_F3.5_EX_DG_HSM.exv.out @@ -146,7 +146,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 825 825 diff --git a/test/data/test_reference_files/Stonehenge.exv.out b/test/data/test_reference_files/Stonehenge.exv.out index 1560f88c..669d566d 100644 --- a/test/data/test_reference_files/Stonehenge.exv.out +++ b/test/data/test_reference_files/Stonehenge.exv.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 7154 7154 diff --git a/test/data/test_reference_files/Tamron_SP70-300_F4-5.6_Di_VC_USD_A030.exv.out b/test/data/test_reference_files/Tamron_SP70-300_F4-5.6_Di_VC_USD_A030.exv.out index bd0acedb..c5a86418 100644 --- a/test/data/test_reference_files/Tamron_SP70-300_F4-5.6_Di_VC_USD_A030.exv.out +++ b/test/data/test_reference_files/Tamron_SP70-300_F4-5.6_Di_VC_USD_A030.exv.out @@ -140,7 +140,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 69 69 diff --git a/test/data/test_reference_files/Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2_0E.exv.out b/test/data/test_reference_files/Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2_0E.exv.out index 179bf2c0..e0ec6c9d 100644 --- a/test/data/test_reference_files/Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2_0E.exv.out +++ b/test/data/test_reference_files/Tamron_SP_24-70mm_F2.8_Di_VC_USD_G2_0E.exv.out @@ -140,7 +140,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 102 102 Exif.NikonFi.FileNumber Short 1 9850 9850 diff --git a/test/data/test_reference_files/Tamron_SP_35mm_f1.4_Di_USD_F045.exv.out b/test/data/test_reference_files/Tamron_SP_35mm_f1.4_Di_USD_F045.exv.out index bd202951..0973d60d 100644 --- a/test/data/test_reference_files/Tamron_SP_35mm_f1.4_Di_USD_F045.exv.out +++ b/test/data/test_reference_files/Tamron_SP_35mm_f1.4_Di_USD_F045.exv.out @@ -145,7 +145,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 0 0 Exif.NikonAf22.AFAreaYPosition Short 1 0 0 Exif.NikonAf22.AFAreaWidth Short 1 0 0 Exif.NikonAf22.AFAreaHeight Short 1 0 0 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 129 129 Exif.NikonFi.FileNumber Short 1 495 495 diff --git a/test/data/test_reference_files/Tokina_AT-X_14-20_F2_PRO_DX.exv.out b/test/data/test_reference_files/Tokina_AT-X_14-20_F2_PRO_DX.exv.out index 01c86a09..d17eef2c 100644 --- a/test/data/test_reference_files/Tokina_AT-X_14-20_F2_PRO_DX.exv.out +++ b/test/data/test_reference_files/Tokina_AT-X_14-20_F2_PRO_DX.exv.out @@ -147,7 +147,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 5296 5296 Exif.NikonAf2.AFAreaYPosition Short 1 2528 2528 Exif.NikonAf2.AFAreaWidth Short 1 984 984 Exif.NikonAf2.AFAreaHeight Short 1 816 816 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 1 On +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 1 Yes Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 109 109 Exif.NikonFi.FileNumber Short 1 135 135 diff --git a/test/data/test_reference_files/Tokina_ATX-i_11-20mm_F2.8_CF.exv.out b/test/data/test_reference_files/Tokina_ATX-i_11-20mm_F2.8_CF.exv.out index 35407dfa..e91c868f 100644 --- a/test/data/test_reference_files/Tokina_ATX-i_11-20mm_F2.8_CF.exv.out +++ b/test/data/test_reference_files/Tokina_ATX-i_11-20mm_F2.8_CF.exv.out @@ -130,7 +130,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 1848 1848 diff --git a/test/data/test_reference_files/Tokina_atx-i_11-16mm_F2.8_CF.exv.out b/test/data/test_reference_files/Tokina_atx-i_11-16mm_F2.8_CF.exv.out index c650e8b1..094bcf97 100644 --- a/test/data/test_reference_files/Tokina_atx-i_11-16mm_F2.8_CF.exv.out +++ b/test/data/test_reference_files/Tokina_atx-i_11-16mm_F2.8_CF.exv.out @@ -141,7 +141,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 0 0 Exif.NikonAf22.AFAreaYPosition Short 1 0 0 Exif.NikonAf22.AFAreaWidth Short 1 0 0 Exif.NikonAf22.AFAreaHeight Short 1 0 0 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 104 104 Exif.NikonFi.FileNumber Short 1 476 476 diff --git a/test/data/test_reference_files/_DSC8437.exv.out b/test/data/test_reference_files/_DSC8437.exv.out index 9e7975e9..53ab4c45 100644 --- a/test/data/test_reference_files/_DSC8437.exv.out +++ b/test/data/test_reference_files/_DSC8437.exv.out @@ -151,7 +151,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 3950 3950 Exif.NikonAf22.AFAreaYPosition Short 1 2871 2871 Exif.NikonAf22.AFAreaWidth Short 1 435 435 Exif.NikonAf22.AFAreaHeight Short 1 360 360 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 1 On +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 1 Yes Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 8437 8437 diff --git a/test/data/test_reference_files/exiv2-bug1014.exv.out b/test/data/test_reference_files/exiv2-bug1014.exv.out index b0d78b2a..bb31b58b 100644 --- a/test/data/test_reference_files/exiv2-bug1014.exv.out +++ b/test/data/test_reference_files/exiv2-bug1014.exv.out @@ -139,7 +139,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 3 3 diff --git a/test/data/test_reference_files/exiv2-bug1014_2.exv.out b/test/data/test_reference_files/exiv2-bug1014_2.exv.out index f6a8aed7..2cf35d9b 100644 --- a/test/data/test_reference_files/exiv2-bug1014_2.exv.out +++ b/test/data/test_reference_files/exiv2-bug1014_2.exv.out @@ -145,7 +145,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 161 161 diff --git a/test/data/test_reference_files/exiv2-bug1026.jpg.out b/test/data/test_reference_files/exiv2-bug1026.jpg.out index 062c30ea..93daa0c8 100644 --- a/test/data/test_reference_files/exiv2-bug1026.jpg.out +++ b/test/data/test_reference_files/exiv2-bug1026.jpg.out @@ -134,7 +134,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 103 103 Exif.NikonFi.FileNumber Short 1 3811 3811 diff --git a/test/data/test_reference_files/exiv2-bug1062.jpg.out b/test/data/test_reference_files/exiv2-bug1062.jpg.out index c081dc18..a8042f11 100644 --- a/test/data/test_reference_files/exiv2-bug1062.jpg.out +++ b/test/data/test_reference_files/exiv2-bug1062.jpg.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 5900 5900 diff --git a/test/data/test_reference_files/exiv2-bug1108.exv.out b/test/data/test_reference_files/exiv2-bug1108.exv.out index 1560f88c..669d566d 100644 --- a/test/data/test_reference_files/exiv2-bug1108.exv.out +++ b/test/data/test_reference_files/exiv2-bug1108.exv.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 7154 7154 diff --git a/test/data/test_reference_files/exiv2-bug1108.xmp.out b/test/data/test_reference_files/exiv2-bug1108.xmp.out index 1560f88c..669d566d 100644 --- a/test/data/test_reference_files/exiv2-bug1108.xmp.out +++ b/test/data/test_reference_files/exiv2-bug1108.xmp.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 7154 7154 diff --git a/test/data/test_reference_files/exiv2-bug1114.jpg.out b/test/data/test_reference_files/exiv2-bug1114.jpg.out index 7956bd50..4bacb1b7 100644 --- a/test/data/test_reference_files/exiv2-bug1114.jpg.out +++ b/test/data/test_reference_files/exiv2-bug1114.jpg.out @@ -143,7 +143,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 1147 1147 diff --git a/test/data/test_reference_files/exiv2-bug1199.webp.out b/test/data/test_reference_files/exiv2-bug1199.webp.out index 2b35ac78..86f6a1fe 100644 --- a/test/data/test_reference_files/exiv2-bug1199.webp.out +++ b/test/data/test_reference_files/exiv2-bug1199.webp.out @@ -78,7 +78,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonCb2b.Version Undefined 4 48 50 49 57 2.19 Exif.NikonCb2b.WB_RGGBLevels Short 4 7396 31796 21644 7380 7396 31796 21644 7380 Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 diff --git a/test/data/test_reference_files/exiv2-bug1225.exv.out b/test/data/test_reference_files/exiv2-bug1225.exv.out index baf28050..3fd983d7 100644 --- a/test/data/test_reference_files/exiv2-bug1225.exv.out +++ b/test/data/test_reference_files/exiv2-bug1225.exv.out @@ -89,19 +89,7 @@ Exif.NikonMe.MultiExposureMode Long 1 0 Off Exif.NikonMe.MultiExposureShots Long 1 0 0 Exif.NikonMe.MultiExposureAutoGain Long 1 0 Off Exif.Nikon3.HighISONoiseReduction Short 1 4 Normal -Exif.NikonAf2.Version Undefined 4 48 50 48 48 2.00 -Exif.NikonAf2.ContrastDetectAF Byte 1 0 Off -Exif.NikonAf2.AFAreaMode Byte 1 129 129 -Exif.NikonAf2.PhaseDetectAF Byte 1 4 On (73-point) -Exif.NikonAf2.PrimaryAFPoint Byte 1 0 0 -Exif.NikonAf2.AFPointsUsed Byte 7 130 0 0 0 8 224 13 130 0 0 0 8 224 13 -Exif.NikonAf2.AFImageWidth Short 1 0 0 -Exif.NikonAf2.AFImageHeight Short 1 270 270 -Exif.NikonAf2.AFAreaXPosition Short 1 768 768 -Exif.NikonAf2.AFAreaYPosition Short 1 0 0 -Exif.NikonAf2.AFAreaWidth Short 1 0 0 -Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.Nikon3.AFInfo2 Undefined 42 48 50 48 48 0 129 4 0 130 0 0 0 8 224 13 0 0 0 14 1 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 48 50 48 48 0 129 4 0 130 0 0 0 8 224 13 0 0 0 14 1 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Exif.NikonAFT.AFFineTune Byte 1 0 Off Exif.NikonAFT.AFFineTuneIndex Byte 1 255 255 Exif.NikonAFT.AFFineTuneAdj SByte 1 0 0 diff --git a/test/data/test_reference_files/exiv2-bug1348.exv.out b/test/data/test_reference_files/exiv2-bug1348.exv.out index fbb5fd62..2c85f1e2 100644 --- a/test/data/test_reference_files/exiv2-bug1348.exv.out +++ b/test/data/test_reference_files/exiv2-bug1348.exv.out @@ -90,7 +90,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 120 120 Exif.NikonFi.FileNumber Short 1 939 939 diff --git a/test/data/test_reference_files/exiv2-bug922a.jpg.out b/test/data/test_reference_files/exiv2-bug922a.jpg.out index 9602615c..ac15e783 100644 --- a/test/data/test_reference_files/exiv2-bug922a.jpg.out +++ b/test/data/test_reference_files/exiv2-bug922a.jpg.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 5900 5900 diff --git a/test/data/test_reference_files/exiv2-issue1208.exv.out b/test/data/test_reference_files/exiv2-issue1208.exv.out index 77379f31..943d0004 100644 --- a/test/data/test_reference_files/exiv2-issue1208.exv.out +++ b/test/data/test_reference_files/exiv2-issue1208.exv.out @@ -151,7 +151,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 0 0 Exif.NikonAf22.AFAreaYPosition Short 1 0 0 Exif.NikonAf22.AFAreaWidth Short 1 0 0 Exif.NikonAf22.AFAreaHeight Short 1 0 0 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 110 110 Exif.NikonFi.FileNumber Short 1 6176 6176 diff --git a/test/data/test_reference_files/exiv2-issue1941-1.exv.out b/test/data/test_reference_files/exiv2-issue1941-1.exv.out index 921da521..335ae8f4 100644 --- a/test/data/test_reference_files/exiv2-issue1941-1.exv.out +++ b/test/data/test_reference_files/exiv2-issue1941-1.exv.out @@ -151,7 +151,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 0 0 Exif.NikonAf22.AFAreaYPosition Short 1 0 0 Exif.NikonAf22.AFAreaWidth Short 1 0 0 Exif.NikonAf22.AFAreaHeight Short 1 0 0 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 6115 6115 diff --git a/test/data/test_reference_files/exiv2-pr1105.exv.out b/test/data/test_reference_files/exiv2-pr1105.exv.out index a367497b..0771c1d3 100644 --- a/test/data/test_reference_files/exiv2-pr1105.exv.out +++ b/test/data/test_reference_files/exiv2-pr1105.exv.out @@ -146,7 +146,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 307 307 Exif.NikonFi.FileNumber Short 1 1727 1727 diff --git a/test/data/test_reference_files/issue_1934_poc1.exv.out b/test/data/test_reference_files/issue_1934_poc1.exv.out index 1560f88c..669d566d 100644 --- a/test/data/test_reference_files/issue_1934_poc1.exv.out +++ b/test/data/test_reference_files/issue_1934_poc1.exv.out @@ -116,7 +116,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 101 101 Exif.NikonFi.FileNumber Short 1 7154 7154 diff --git a/test/data/test_reference_files/issue_743.exv.out b/test/data/test_reference_files/issue_743.exv.out index 23f1c152..5c52542e 100644 --- a/test/data/test_reference_files/issue_743.exv.out +++ b/test/data/test_reference_files/issue_743.exv.out @@ -140,7 +140,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 106 106 Exif.NikonFi.FileNumber Short 1 5190 5190 diff --git a/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.exv.out b/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.exv.out index 17d087ec..1cce7fe9 100644 --- a/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.exv.out +++ b/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.exv.out @@ -79,7 +79,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonCb2b.Version Undefined 4 48 50 49 57 2.19 Exif.NikonCb2b.WB_RGGBLevels Short 4 7396 31796 21644 7380 7396 31796 21644 7380 Exif.NikonFi.Version Undefined 4 0 0 0 0 () diff --git a/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.webp.out b/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.webp.out index 17d087ec..1cce7fe9 100644 --- a/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.webp.out +++ b/test/data/test_reference_files/issue_ghsa_5p8g_9xf3_gfrr_poc.webp.out @@ -79,7 +79,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonCb2b.Version Undefined 4 48 50 49 57 2.19 Exif.NikonCb2b.WB_RGGBLevels Short 4 7396 31796 21644 7380 7396 31796 21644 7380 Exif.NikonFi.Version Undefined 4 0 0 0 0 () diff --git a/test/data/test_reference_files/pr_1994_poc1.jpg.out b/test/data/test_reference_files/pr_1994_poc1.jpg.out index 657fa2a6..09bee54b 100644 --- a/test/data/test_reference_files/pr_1994_poc1.jpg.out +++ b/test/data/test_reference_files/pr_1994_poc1.jpg.out @@ -143,7 +143,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 100 100 Exif.NikonFi.FileNumber Short 1 423 423 diff --git a/test/data/test_reference_files/pr_1994_poc2.jpg.out b/test/data/test_reference_files/pr_1994_poc2.jpg.out index eb2149fb..8ac2eb53 100644 --- a/test/data/test_reference_files/pr_1994_poc2.jpg.out +++ b/test/data/test_reference_files/pr_1994_poc2.jpg.out @@ -143,7 +143,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 200 200 Exif.NikonFi.FileNumber Short 1 4345 4345 diff --git a/test/data/test_reference_files/test_issue_990.exv.out b/test/data/test_reference_files/test_issue_990.exv.out index 96f0f59f..86645150 100644 --- a/test/data/test_reference_files/test_issue_990.exv.out +++ b/test/data/test_reference_files/test_issue_990.exv.out @@ -146,7 +146,7 @@ Exif.NikonAf2.AFAreaXPosition Short 1 0 0 Exif.NikonAf2.AFAreaYPosition Short 1 0 0 Exif.NikonAf2.AFAreaWidth Short 1 0 0 Exif.NikonAf2.AFAreaHeight Short 1 0 0 -Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 Off +Exif.NikonAf2.ContrastDetectAFInFocus Byte 1 0 No Exif.NikonFi.Version Undefined 4 48 49 48 48 1.00 Exif.NikonFi.DirectoryNumber Short 1 281 281 Exif.NikonFi.FileNumber Short 1 7965 7965 diff --git a/tests/bugfixes/github/test_issue_646.py b/tests/bugfixes/github/test_issue_646.py index 4499b51d..b836d432 100644 --- a/tests/bugfixes/github/test_issue_646.py +++ b/tests/bugfixes/github/test_issue_646.py @@ -22,7 +22,7 @@ Exif.NikonAf22.AFAreaXPosition Short 1 3950 Exif.NikonAf22.AFAreaYPosition Short 1 2871 Exif.NikonAf22.AFAreaWidth Short 1 435 Exif.NikonAf22.AFAreaHeight Short 1 360 -Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 On +Exif.NikonAf22.ContrastDetectAFInFocus Byte 1 Yes """ ] stderr = [ "" ] * len(commands) From 54eab964a645b2bbfa78cf1f0001964cc1932738 Mon Sep 17 00:00:00 2001 From: Michael Allman Date: Tue, 22 Feb 2022 15:44:39 -0800 Subject: [PATCH 4/5] When selecting which version of nikonAf2 metadata to parse, include the size of the data declared in the tag header as part of the lookup --- src/makernote_int.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/makernote_int.cpp b/src/makernote_int.cpp index 56e2bbd2..e79224a3 100644 --- a/src/makernote_int.cpp +++ b/src/makernote_int.cpp @@ -1143,8 +1143,8 @@ namespace Exiv2 { { 0x00a8, "0107", 0, 3, NA }, { 0x00a8, "0108", 0, 3, NA }, // NikonAf - { 0x00b7, "0100", 0, 0, NA }, - { 0x00b7, "0101", 0, 1, NA }, + { 0x00b7, "0100", 30, 0, NA }, + { 0x00b7, "0101", 84, 1, NA }, }; int nikonSelector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const /*pRoot*/) From 5ff7d89a4cda0be257d62014770e299a3d73c8b9 Mon Sep 17 00:00:00 2001 From: Michael Allman Date: Thu, 24 Feb 2022 14:57:43 -0800 Subject: [PATCH 5/5] Document origin of data size specifications for Nikon maker note tag 0xb7 --- src/makernote_int.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/makernote_int.cpp b/src/makernote_int.cpp index e79224a3..22845625 100644 --- a/src/makernote_int.cpp +++ b/src/makernote_int.cpp @@ -1143,8 +1143,8 @@ namespace Exiv2 { { 0x00a8, "0107", 0, 3, NA }, { 0x00a8, "0108", 0, 3, NA }, // NikonAf - { 0x00b7, "0100", 30, 0, NA }, - { 0x00b7, "0101", 84, 1, NA }, + { 0x00b7, "0100", 30, 0, NA }, // These sizes have been found in tiff headers of MN + { 0x00b7, "0101", 84, 1, NA }, // tag 0xb7 in sample image metadata for each version }; int nikonSelector(uint16_t tag, const byte* pData, uint32_t size, TiffComponent* const /*pRoot*/)