Skip to content

Commit ceee3dc

Browse files
committed
Indicate no translation for Nikon lenses
1 parent 38545e5 commit ceee3dc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/nikonmn_int.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3236,7 +3236,7 @@ std::ostream& Nikon3MakerNote::printLensId(std::ostream& os, const Value& value,
32363236
*/
32373237
if (auto pf = Exiv2::find(fmountlens, vid))
32383238
return os << pf->manuf << " " << pf->lensname;
3239-
return os << value;
3239+
return os << "(" << value << ")";
32403240
}
32413241

32423242
byte raw[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
@@ -3251,14 +3251,14 @@ std::ostream& Nikon3MakerNote::printLensId(std::ostream& os, const Value& value,
32513251
ExifKey key(pre + std::string(tags[i]));
32523252
auto md = metadata->findKey(key);
32533253
if (md == metadata->end() || md->typeId() != unsignedByte || md->count() == 0) {
3254-
return os << value;
3254+
return os << "(" << value << ")";
32553255
}
32563256
raw[i] = static_cast<byte>(md->toInt64());
32573257
}
32583258

32593259
auto md = metadata->findKey(ExifKey("Exif.Nikon3.LensType"));
32603260
if (md == metadata->end() || md->typeId() != unsignedByte || md->count() == 0) {
3261-
return os << value;
3261+
return os << "(" << value << ")";
32623262
}
32633263
raw[7] = static_cast<byte>(md->toInt64());
32643264

@@ -3282,9 +3282,9 @@ std::ostream& Nikon3MakerNote::printLensId(std::ostream& os, const Value& value,
32823282
}
32833283
}
32843284
// Lens not found in database
3285-
return os << value;
3285+
return os << "(" << value << ")";
32863286
#else
3287-
return os << value;
3287+
return os << "(" << value << ")";
32883288
#endif // EXV_HAVE_LENSDATA
32893289
}
32903290

@@ -3907,7 +3907,7 @@ std::ostream& Nikon3MakerNote::printLensId4ZMount(std::ostream& os, const Value&
39073907
for (auto&& [l, manuf, lensname] : zmountlens)
39083908
if (l == lid)
39093909
return os << manuf << " " << lensname;
3910-
return os << lid;
3910+
return os << "(" << value << ")";
39113911
}
39123912

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

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

0 commit comments

Comments
 (0)