Bug 494585

Summary: XMP-dc:Subject tags not imported to the database with HEIF file.
Product: [Applications] digikam Reporter: Caro <caro.portal>
Component: Metadata-XmpAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 8.4.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 8.5.0
Sentry Crash Report:
Attachments: Picture with XMP-dc:Subject tags set, not showing up in Digikam

Description Caro 2024-10-12 09:21:52 UTC
Created attachment 174725 [details]
Picture with XMP-dc:Subject tags set, not showing up in Digikam

SUMMARY

Some HEIC pictures (apparently, only live pictures received by airDrop) have 2 XMP structures. While digikam properly set-up tags on its own, it does not show XMP-dc:Subject tags (that I set using ExifTool, for mass update of pictures).

The configuration of namespaces doesn't seem to help.

Note: I've been searching everywhere for a month, and can't seem to find any documentation. I assume this is then a bug - if there is actually a known documentation on this, apologies for the bug report, and thanks in advance for pointing me to the proper documentation.

STEPS TO REPRODUCE
1. Load the picture in Digikam
2. Navigate to Captions->Tags, for this picture
3. The tags do not show

OBSERVED RESULT

Tags LocCountry: Switzerland and LocPlace: Aire de repos Pertit do not display, while they are well in the file

EXPECTED RESULT

Tags LocCountry: Switzerland and LocPlace: Aire de repos Pertit display

SOFTWARE/OS VERSIONS
Windows: 11

ADDITIONAL INFORMATION
Comment 1 caulier.gilles 2024-10-12 10:23:35 UTC
Exiv2 do not show XMP relevant information from this HEIF file :

https://i.imgur.com/r3jpTf0.png

But ExifTool yes :

https://i.imgur.com/1JLDHs7.png

In all cases, you must try to uses ExifTool as metadata backend.

Gilles Caulier
Comment 2 Maik Qualmann 2024-10-12 10:43:45 UTC
The XMP RAW data looks strange, after the end there is a block that Exiv2 shows. Even rewriting the XMP metadata with ExifTool does not solve the problem.

The metadata is not read with ExifTool because Exiv2 does not report an error. I will create an option to enable reading with ExifTool as well.

Normally the problem would have to be reported to Exiv2 so that Exiv2 becomes a bit more "tolerant".

Maik
Comment 3 Maik Qualmann 2024-10-12 12:55:49 UTC
Git commit 65aa181677e55f379bfb37720489f117b7a93c20 by Maik Qualmann.
Committed on 12/10/2024 at 12:54.
Pushed by mqualmann into branch 'master'.

add option to read metadata from files with ExifTool backend
FIXED-IN: 8.5.0

M  +1    -1    NEWS
M  +1    -0    core/libs/metadataengine/dmetadata/dmetadata.cpp
M  +10   -0    core/libs/metadataengine/engine/metaengine.cpp
M  +10   -0    core/libs/metadataengine/engine/metaengine.h
M  +7    -2    core/libs/metadataengine/engine/metaengine_fileio.cpp
M  +1    -0    core/libs/metadataengine/engine/metaengine_p.cpp
M  +1    -0    core/libs/metadataengine/engine/metaengine_p.h
M  +4    -0    core/libs/metadataengine/engine/metaenginesettingscontainer.cpp
M  +1    -0    core/libs/metadataengine/engine/metaenginesettingscontainer.h
M  +1    -0    core/utilities/setup/metadata/setupmetadata.cpp
M  +18   -9    core/utilities/setup/metadata/setupmetadata_behavior.cpp
M  +1    -0    core/utilities/setup/metadata/setupmetadata_p.cpp
M  +1    -0    core/utilities/setup/metadata/setupmetadata_p.h

https://invent.kde.org/graphics/digikam/-/commit/65aa181677e55f379bfb37720489f117b7a93c20