From e23fc17ccfee9f03830d9c5487fb02b16950aed5 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Fri, 29 Mar 2019 09:21:47 +0100 Subject: [PATCH] Search for DateTimeOriginal if not found in standard location MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DateTimeOriginal and DateTimeDigitized Exif tags should be in the same group - ExifIFD, but the Leica M8 stores DateTimeOriginal in the IFD0 group. This patch by Flössie allows to find the tag. Closes #5251 --- rtengine/imagedata.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/imagedata.cc b/rtengine/imagedata.cc index 4dcfe80ff..4e38c612a 100644 --- a/rtengine/imagedata.cc +++ b/rtengine/imagedata.cc @@ -260,7 +260,7 @@ FrameData::FrameData (rtexif::TagDirectory* frameRootDir_, rtexif::TagDirectory* iso_speed = tag->toDouble (); } - if ((tag = exif->getTag ("DateTimeOriginal"))) { + if ((tag = exif->findTag("DateTimeOriginal", true))) { if (sscanf ((const char*)tag->getValue(), "%d:%d:%d %d:%d:%d", &time.tm_year, &time.tm_mon, &time.tm_mday, &time.tm_hour, &time.tm_min, &time.tm_sec) == 6) { time.tm_year -= 1900; time.tm_mon -= 1;