Skip to content

Commit 514b6b9

Browse files
committed
Indicate no translation for Nikon lenses
(cherry picked from commit ceee3dc)
1 parent ce23a5f commit 514b6b9

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/nikonmn_int.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3133,7 +3133,7 @@ std::ostream& Nikon3MakerNote::printLensId(std::ostream& os, const Value& value,
31333133
*/
31343134
if (auto pf = Exiv2::find(fmountlens, vid))
31353135
return os << pf->manuf << " " << pf->lensname;
3136-
return os << value;
3136+
return os << "(" << value << ")";
31373137
}
31383138

31393139
byte raw[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
@@ -3148,14 +3148,14 @@ std::ostream& Nikon3MakerNote::printLensId(std::ostream& os, const Value& value,
31483148
ExifKey key(pre + std::string(tags[i]));
31493149
auto md = metadata->findKey(key);
31503150
if (md == metadata->end() || md->typeId() != unsignedByte || md->count() == 0) {
3151-
return os << value;
3151+
return os << "(" << value << ")";
31523152
}
31533153
raw[i] = static_cast<byte>(md->toInt64());
31543154
}
31553155

31563156
auto md = metadata->findKey(ExifKey("Exif.Nikon3.LensType"));
31573157
if (md == metadata->end() || md->typeId() != unsignedByte || md->count() == 0) {
3158-
return os << value;
3158+
return os << "(" << value << ")";
31593159
}
31603160
raw[7] = static_cast<byte>(md->toInt64());
31613161

@@ -3180,9 +3180,9 @@ std::ostream& Nikon3MakerNote::printLensId(std::ostream& os, const Value& value,
31803180
}
31813181
}
31823182
// Lens not found in database
3183-
return os << value;
3183+
return os << "(" << value << ")";
31843184
#else
3185-
return os << value;
3185+
return os << "(" << value << ")";
31863186
#endif // EXV_HAVE_LENSDATA
31873187
}
31883188

@@ -3895,7 +3895,7 @@ std::ostream& Nikon3MakerNote::printLensId4ZMount(std::ostream& os, const Value&
38953895
for (auto&& [l, manuf, lensname] : zmountlens)
38963896
if (l == lid)
38973897
return os << manuf << " " << lensname;
3898-
return os << lid;
3898+
return os << "(" << value << ")";
38993899
}
39003900

39013901
std::ostream& Nikon3MakerNote::printApertureLd4(std::ostream& os, const Value& value, const ExifData*) {

test/data/test_reference_files/CH0_0174.exv.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Exif.NikonLd4.MaxApertureAtMinFocal Byte 1 36 F2.8
112112
Exif.NikonLd4.MaxApertureAtMaxFocal Byte 1 36 F2.8
113113
Exif.NikonLd4.MCUVersion Byte 1 123 123
114114
Exif.NikonLd4.EffectiveMaxAperture Byte 1 36 F2.8
115-
Exif.NikonLd4.LensID Short 1 0 0
115+
Exif.NikonLd4.LensID Short 1 0 (0)
116116
Exif.NikonLd4.MaxAperture Short 1 0 n/a
117117
Exif.NikonLd4.FNumber Short 1 0 n/a
118118
Exif.NikonLd4.FocalLength2 Short 1 0 n/a

test/data/test_reference_files/NikonZ6.exv.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Exif.NikonLd4.AFAperture Byte 1 0 n/a
9090
Exif.NikonLd4.FocusPosition Byte 1 0 0
9191
Exif.NikonLd4.FocusDistance Byte 1 0 n/a
9292
Exif.NikonLd4.FocalLength Byte 1 0 n/a
93-
Exif.NikonLd4.LensIDNumber Byte 1 0 0
93+
Exif.NikonLd4.LensIDNumber Byte 1 0 (0)
9494
Exif.NikonLd4.LensFStops Byte 1 0 F0.0
9595
Exif.NikonLd4.MinFocalLength Byte 1 0 n/a
9696
Exif.NikonLd4.MaxFocalLength Byte 1 0 n/a

tests/bugfixes/github/test_pr_1437.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Nikon_LensData8(metaclass=system_tests.CaseMeta):
1919
Exif.NikonLd4.MaxApertureAtMinFocal Byte 1 F2.8
2020
Exif.NikonLd4.MaxApertureAtMaxFocal Byte 1 F2.8
2121
Exif.NikonLd4.EffectiveMaxAperture Byte 1 F2.8
22-
Exif.NikonLd4.LensID Short 1 0
22+
Exif.NikonLd4.LensID Short 1 (0)
2323
Exif.NikonLd4.MaxAperture Short 1 n/a
2424
Exif.Nikon3.ShutterCount Long 1 174
2525
Exif.Photo.LensSpecification Rational 4 70-200mm F2.8

0 commit comments

Comments
 (0)