From c7d5b5076dcb41d69248b6873b26eee331307b67 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Mon, 21 Mar 2022 01:09:50 -0700 Subject: [PATCH] metadata: fallback to Exif.Photo.LensModel for lenses unknown to exiv2 (cherry picked from commit 64e25471b003e302414d0cf48f64ccd1a988b454) --- rtengine/imagedata.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index a1db3c8d3..2caba4553 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -281,6 +281,10 @@ FramesData::FramesData(const Glib::ustring &fname) : if (find_tag(Exiv2::lensName)) { lens = validateUft8(pos->print(&exif)); // validateUft8 (#5923) still needed? + if (pos->count() == 1 && lens == std::to_string(pos->toLong()) && + find_exif_tag("Exif.Photo.LensModel")) { + lens = validateUft8(pos->print(&exif)); // validateUft8 (#5923) still needed? + } } else if (find_exif_tag("Exif.Photo.LensSpecification") && pos->count() == 4) { const auto round = [](float f) -> float