From 78f4d23b295f992e3066b878e0f5ef8dcf21ae51 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Tue, 23 Nov 2021 00:35:44 +0100 Subject: Change pri-order for exit dates Date time can be when the image was last modified while orginal and digitized are supposed to be at the time of creation. --- src/image.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/image.cc b/src/image.cc index c540387..9f668fe 100644 --- a/src/image.cc +++ b/src/image.cc @@ -141,13 +141,13 @@ void load_exif(std::filesystem::path const& path, ImageImpl* img) { break; } } - entry = exif_content_get_entry(data->ifd[EXIF_IFD_0], EXIF_TAG_DATE_TIME); + entry = exif_content_get_entry(data->ifd[EXIF_IFD_EXIF], + EXIF_TAG_DATE_TIME_ORIGINAL); if (!entry) { entry = exif_content_get_entry(data->ifd[EXIF_IFD_EXIF], - EXIF_TAG_DATE_TIME_ORIGINAL); + EXIF_TAG_DATE_TIME_DIGITIZED); if (!entry) { - entry = exif_content_get_entry(data->ifd[EXIF_IFD_EXIF], - EXIF_TAG_DATE_TIME_DIGITIZED); + entry = exif_content_get_entry(data->ifd[EXIF_IFD_0], EXIF_TAG_DATE_TIME); } } if (entry && entry->format == EXIF_FORMAT_ASCII) { -- cgit v1.2.3-70-g09d2