From a1d31bc6b444150920bd5295c064d3730336c701 Mon Sep 17 00:00:00 2001 From: Mark Otway Date: Sat, 7 Oct 2023 13:09:31 +0100 Subject: [PATCH] Patch for #496 Fix canon metadata date/time issue. Also, pull latest base image with imagemagick and HEIC fix. --- Damselfly.Core/Services/MetaDataService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Damselfly.Core/Services/MetaDataService.cs b/Damselfly.Core/Services/MetaDataService.cs index 038f6b7e..aac77511 100644 --- a/Damselfly.Core/Services/MetaDataService.cs +++ b/Damselfly.Core/Services/MetaDataService.cs @@ -407,6 +407,9 @@ private bool GetImageMetaData(ref ImageMetaData imgMetaData, out string[] keywor if ( IfdDirectory != null ) { + if ( imgMetaData.DateTaken == DateTime.MinValue ) + imgMetaData.DateTaken = IfdDirectory.SafeGetExifDateTime(ExifDirectoryBase.TagDateTime); + var exifDesc = IfdDirectory.SafeExifGetString(ExifDirectoryBase.TagImageDescription).SafeTrim(); imgMetaData.Description = FilteredDescription(exifDesc); @@ -1091,4 +1094,4 @@ public static void GetImageSize(string fullPath, out int width, out int height) } #endregion -} \ No newline at end of file +}