SUMMARY After importing a set of images from SD card, the time of import is displayed as the creation date of some images. This happened with 15 images while 35 others were shot on the same day. The complete set consisted of 92 images. I also enabled 'Use file metadata' as suggested here: https://bugs.kde.org/show_bug.cgi?id=446632 , but creation times are still wrong. The import dialog displays correct creation times. STEPS TO REPRODUCE 1. Import a set of images into an existing album. The album contains some non-empty subfolders, but is otherwise empty. 2. Observe creation date of images. (Unfortunately I'm not sure, if this ever happened before with any other set of images.) OBSERVED RESULT Example: * The image is imported at around 2022-03-30T18:38:56 (UTC). * The image is imported with option '[date]_[file]', so the creation datetime is encoded also in the filename, '20220312T152146_DSC06802.JPG' in the example. * On import, DigiKam apparently writes '2022-03-30T18:38:56' (the time of import) as the creation and digitization datetime in its database (sqlite, table ImageInformation). Checked with DB Browser for SQLite. * Looking at XMP meta data: * Create Date: 2022-03-30T18:38:56+00:00 (This is wrong) * Modify Date: 2022-03-12T14:21:46+00:00 (Modification can't be earlier than creation...??) * Date and Time Original: 2022-03-30T18:38:56+00:00 (Also wrong) * My file browser returns the correct 'date taken' (2022-03-12T14:21:46) on disk and also on the original SD card. EXPECTED RESULT Creation date not mixed up with date of import. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Linux (x86_64) release 5.15.28-1-MANJARO, Xfce 4.16 KDE Plasma Version: - KDE Frameworks Version: Qt Version: 5 ADDITIONAL INFORMATION
If you re-read the metadata from the images (via the item menu for example). Is the correct date then displayed? Otherwise we need a sample image that causes problems and the specification of which date you are expecting. But if the Exif or XMP metadata is already wrong, the problem cannot be with digiKam. This metadata is not changed during the import. Maik
Re-reading the metadata doesn't change anything. Here's another bit of info. I opened the 'same' picture in different situations with showFoto and exported the XMP metadata as a text file. Creation date of the copy seems to change anytime the file is copied to another location. Diff of original metadata on SD-Card and metadata of the imported picture: > $ diff DSC06802_OnSDCard.xmp 20220312T142146_DSC06802_ImportedByDigiKam.xmp >15c15 >< tiff:DateTime="2022-03-12T14:21:46+00:00" >--- >> tiff:DateTime="2022-03-30T20:18:11+00:00" >20c20 >< exif:DateTimeOriginal="2022-03-12T14:21:46+00:00" >--- >> exif:DateTimeOriginal="2022-03-30T20:18:11+00:00" >24c24 >< xmp:CreateDate="2022-03-12T14:21:46+00:00" >--- >> xmp:CreateDate="2022-03-30T20:18:11+00:00" >27c27 >< MIFF:BaseName="DSC06802" >--- >> MIFF:BaseName="20220312T142146_DSC06802" Diff of imported picture and imported, then copied to another place metadata: >> $ diff 20220312T142146_DSC06802_ImportedByDigiKam.xmp 20220312T142146_DSC06802_ImportedByDigiKamThenCopied.xmp >15c15 >< tiff:DateTime="2022-03-30T20:18:11+00:00" >--- >> tiff:DateTime="2022-03-31T17:40:14+00:00" >20c20 >< exif:DateTimeOriginal="2022-03-30T20:18:11+00:00" >--- >> exif:DateTimeOriginal="2022-03-31T17:40:14+00:00" >24c24 >< xmp:CreateDate="2022-03-30T20:18:11+00:00" >--- >> xmp:CreateDate="2022-03-31T17:40:14+00:00" >27c27 >< MIFF:BaseName="20220312T142146_DSC06802" >--- >> MIFF:BaseName="20220312T142146_DSC06802_ImportedByDigiKam" Never noticed anything like that. And why only with these 15 files? So you are right: It has probably nothing to do with digiKam. (But I'm grateful for any ideas, what might cause this...) (In reply to Maik Qualmann from comment #1) > If you re-read the metadata from the images (via the item menu for example). > Is the correct date then displayed? Otherwise we need a sample image that > causes problems and the specification of which date you are expecting. > > But if the Exif or XMP metadata is already wrong, the problem cannot be with > digiKam. This metadata is not changed during the import. > > Maik
I really have no idea who is changing the time metadata in the images. All I know is that digiKam doesn't do it. What desktop are they using? XFCE? I see this entry in their diffs: MIFF:BaseName="DSC06802 The MIFF entry is a hint for Magick Image File Format. Do you have anything from Image Magick running? Maik
I'm not aware of anything running Image Magick. But I tried to read the metadata of the pictures directly on the SD card using exiv2. And here's the problem: Corrupted metadata in 15 files, but the pictures themselves seem fine. Maybe the card is just faulty, but I don't see how that could only affect metadata. Strange how many tools can still read (or guess?) something anyway... I would have expected a warning. Thanks anyway, I guess this can be closed now. Or turned into a feature request (show warning if metadata corrupt) ;)
I can confirm there is a problem with the import process. I copied 200 images from my Canon EOS 500D SD-Card into a local folder (using cp command in bash). Without further modification of the images i started to import the images. In the import settings i chose to rename the files based on the image creation date ("[date]{unique}"). All files end up with the filename being the timstampe when they were copied from SD-Card to the local folder. The exif metadata is correct in all images. I retried with "use file metadata" checked, but had the same result. After importing the pictures i could still set the correct name by using the "rename" functionality in digikam with the same settings that did not work in the import wizard ("[date]{unique}"). All images got renamed correctly according to their EXIF creation date. Running Digikam 7.6.0 on Arch Linux (Build date: 22.04.22 17:04)
(In reply to Michael Bauer from comment #5) Did you try to read metadata using exiv2 (usage: exiv2 pr <path-to-image>)? Other tools did not report any problems. But exiv2 revealed that the metadata of some pictures were corrupted. I thought that was plausible since this happened with an old SD card (probably older than 10 years). Although I'm still confused why corruption would only affect metadata, not the image itself.
@Michael Bauer, "use file metadata" only works after reading the images again in the import tool. If the images are already displayed in the import tool, switching to the option has no effect. With this option enabled, the date should match. Maik
(In reply to Maik Qualmann from comment #7) > @Michael Bauer, "use file metadata" only works after reading the images > again in the import tool. If the images are already displayed in the import > tool, switching to the option has no effect. With this option enabled, the > date should match. Indeed, that was the problem. Import worked as expected!
Git commit eeb5ba940b0b7e523200e791b9f98623ab75b65b by Maik Qualmann. Committed on 15/06/2022 at 17:12. Pushed by mqualmann into branch 'master'. fix read creation date from imported items from Import Tool - Metadata for renaming will only be read after saving in the album - Correct creation of date based albums. - Add metadata and camera renaming options in the Import Tool. - Removed live renaming preview in import view, preview for selected item only. Related: bug 444928, bug 386072, bug 381214, bug 455091 FIXED-IN: 8.0.0 M +5 -1 NEWS M +9 -1 core/utilities/advancedrename/advancedrenamemanager.cpp M +1 -0 core/utilities/advancedrename/advancedrenamemanager.h M +2 -0 core/utilities/advancedrename/common/parsesettings.h M +1 -3 core/utilities/advancedrename/parser/importrenameparser.cpp M +4 -1 core/utilities/advancedrename/parser/options/filepropertiesoption.cpp M +129 -201 core/utilities/import/backend/cameracontroller.cpp M +1 -18 core/utilities/import/backend/cameracontroller.h M +1 -1 core/utilities/import/backend/camiteminfo.h M +1 -1 core/utilities/import/items/importdelegate.cpp M +339 -267 core/utilities/import/main/importui.cpp M +9 -10 core/utilities/import/main/importui.h M +7 -1 core/utilities/import/main/importui_p.h M +8 -28 core/utilities/import/widgets/renamecustomizer.cpp M +2 -1 core/utilities/import/widgets/renamecustomizer.h https://invent.kde.org/graphics/digikam/commit/eeb5ba940b0b7e523200e791b9f98623ab75b65b