From b3a12b699add804e3eba988377e2a5c6f70374f6 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Fri, 21 Aug 2015 11:01:03 +0200 Subject: [PATCH] Don't replace focal_len from Exif by focal_len from Makernotes is Makernotes focal_len is 0 --- rtengine/imagedata.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index 9d3f8d5ea..6d4df4890 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -406,7 +406,10 @@ void ImageData::extractInfo () rtexif::Tag* flt = mnote->getTagP ("LensInfo/FocalLength"); if (flt) { - focal_len = flt->toDouble (); + // Don't replace Exif focal_len if Makernotes focal_len is 0 + if (flt->toDouble() > 0) { + focal_len = flt->toDouble (); + } } else if ((flt = mnote->getTagP ("FocalLength"))) { rtexif::Tag* flt = mnote->getTag ("FocalLength"); focal_len = flt->toDouble ();