Bug 478002 - Import Pictures dialog doesn't use file metadata (EXIF etc.)
Summary: Import Pictures dialog doesn't use file metadata (EXIF etc.)
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Import-PostProcessing (show other bugs)
Version: 8.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-03 17:30 UTC by TD
Modified: 2023-12-03 19:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 8.3.0
Sentry Crash Report:


Attachments
digiKam 8.2.0 dialog (17.42 KB, image/jpeg)
2023-12-03 17:30 UTC, TD
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TD 2023-12-03 17:30:51 UTC
Created attachment 163824 [details]
digiKam 8.2.0 dialog

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Import / Add pictures / select file folder
2. Custom rename / choose any metadata entry 
3. 

OBSERVED RESULT
The returned string is empty, no matter if present in the file or not

EXPECTED RESULT
The returned string should contain the chosen metadata entry, if present in the file

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I want to rename the files using Exif.Image.DateTimeOriginal, since using the date & time option (picture / standard) only gives me the file creation date, which is often wrong when doing MTP transfer from phone to PC before.
Comment 1 Maik Qualmann 2023-12-03 17:46:32 UTC
In order to have metadata in the import tool, you have to activate the loading of metadata under Behavior in the digiKam camera settings (makes the connection slower). But that would only be for the view in the import tool. After downloading, digiKam always uses the metadata since digiKam-8.0.0.

Maik
Comment 2 Maik Qualmann 2023-12-03 18:29:16 UTC
Another note about the metadata in your example. The entry "Exif.Image.DateTimeOriginal" is often not present in images. Use "Exif.Photo.DateTimeOriginal" instead.

Maik
Comment 3 TD 2023-12-03 18:42:35 UTC
(In reply to Maik Qualmann from comment #1)
> In order to have metadata in the import tool, you have to activate the
> loading of metadata under Behavior in the digiKam camera settings (makes the
> connection slower). But that would only be for the view in the import tool.
> After downloading, digiKam always uses the metadata since digiKam-8.0.0.
> 
> Maik

Enabling or disabling this option doesn't seem to affect the import pictures dialog. The "device information" dialog says that the driver for "embedded cameras" doesn't use libgphoto2.
Comment 4 TD 2023-12-03 18:44:22 UTC
(In reply to Maik Qualmann from comment #2)
> Another note about the metadata in your example. The entry
> "Exif.Image.DateTimeOriginal" is often not present in images. Use
> "Exif.Photo.DateTimeOriginal" instead.
> 
> Maik

Thank you, this did the "magic" :-)
Comment 5 TD 2023-12-03 19:00:01 UTC
One little additional question regarding the DateTime formatting / modification:
[meta:Exif.Photo.DateTimeOriginal]{replace:"_","",i} still results in the standard yyyy_MM_dd hh_mm_ss.ext. How do I remove the underscore without building a long custom expression using range?
Comment 6 Maik Qualmann 2023-12-03 19:22:27 UTC
Yes, it's hard for Windows users or users of Windows file systems to guess. The date string usually consists of colons as separators. Colons are forbidden characters for Windows, so they are automatically converted to underscores. So instead of replacing "_", you have to replace ":".

Maik