From 302a2f217e5a41c29db1ea6b0d5a00a3f43f7c2a Mon Sep 17 00:00:00 2001 From: heckflosse Date: Wed, 4 Apr 2018 16:28:27 +0200 Subject: [PATCH] Lens data in Exif shows incorrect information for manual focus Nikon lenses, fixes #4485 --- rtexif/nikonattribs.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/rtexif/nikonattribs.cc b/rtexif/nikonattribs.cc index 3d844d2af..3cb7a442e 100644 --- a/rtexif/nikonattribs.cc +++ b/rtexif/nikonattribs.cc @@ -23,7 +23,6 @@ #include #include #include - #include "rtexif.h" using namespace std; @@ -543,7 +542,16 @@ public: if (r != lenses.end()) { if (r == lenses.begin() && EffectiveMaxApertureString != "") { // first entry is for unchipped lenses - ld << "Lens = Unknown $FL$mm f/" << EffectiveMaxApertureString; + Tag *FLTag = t->getParent()->getRoot()->findTag ("FocalLength"); + ld << "Lens = MF "; + + if(FLTag) { + ld << FLTag->valueToString () << "mm"; + } else { + ld << "0mm"; + } + + ld << " f/" << EffectiveMaxApertureString; } else { ld << "Lens = " << r->second; }