Bug 446350

Summary: XMP metadata in iPhone pictures cannot be modified
Product: [Applications] digikam Reporter: MarcP <iwannaberich>
Component: Metadata-XmpAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: iwannaberich, metzpinguin
Priority: NOR    
Version: 7.4.0   
Target Milestone: ---   
Platform: Flatpak   
OS: Linux   
Latest Commit: Version Fixed In: 7.4.0
Sentry Crash Report:
Attachments: Affected picture (2015-06-13 18.56.11.jpg)
Screenshot of XMP metadata
Screnshot of IPTC metadata

Description MarcP 2021-12-01 23:58:09 UTC
SUMMARY
I have been having problems with pictures taken with iPhones (several versions, but most of my examples come from the iPhone SE and iPhone 6). Tags do not seem to be properly written to XMP, so they lose their hierarchy, or they simply aren't modified after writing them to the file. However, these tags appear in IPTC. 

For some reason, this is a relatively recent problem (since digikam 7.3 maybe?), since some hierarchies seem to have been been indeed written correctly in the past. 

Also, I believe that all affected pictures have a face region on them. I have attached a sample picture (2015-06-13 18.56.11.jpg) with this problem. Noticed how it contains the tags Hawaii, Honolulu, Waikiki that appear as first-level tags (which should be actually hierarchical), and an additional tag called "ASI" that is only visible in IPTC. Any attempts at modifying the tags in that picture in digikam fail. This is why I think that it can be related to bug #436286

As a workaround, I use exiftool to repair the XMP metadata, and after that point it works just fine. The command I use is: exiftool -XMP:All -TagsFromFile @ -XMP:all <file.jpg>

STEPS TO REPRODUCE
1. Select a picture taken with an iPhone and containing one face region.
2. Add some tags in a hierarchy.
3. Re-read the metadata.

OBSERVED RESULT
The hierarchy disappears. All tags appear as first-level tags, or do not appear at all under XMP (but they do in IPTC).

EXPECTED RESULT
Tags are written properly into the file.

SOFTWARE/OS VERSIONS
Digikam 7.4 (via flatpak)
Build date: 30/11/21 10:27 (target: Debug)
Rev.: 3d2d9c9df3d9b8940502e89b83d39ce74a335754
Ubuntu 20.04.3 LTS
Comment 1 MarcP 2021-12-01 23:59:28 UTC
Created attachment 144132 [details]
Affected picture (2015-06-13 18.56.11.jpg)
Comment 2 MarcP 2021-12-02 00:00:31 UTC
Created attachment 144133 [details]
Screenshot of XMP metadata
Comment 3 MarcP 2021-12-02 00:01:06 UTC
Created attachment 144134 [details]
Screnshot of IPTC metadata
Comment 4 Maik Qualmann 2021-12-02 07:16:41 UTC
Yes, the cause is the same. The problem has not only existed since digiKam-7.3.0. I can also reproduce it with an old digiKam-6.4.0 AppImage. Writing XMP metadata works, just no face metadata. 

digikam.metaengine: Cannot get Xmp metadata tag title with Exiv2:  (Error # 35 :  "No namespace info available for XMP prefix `apple-fi'"

Maik

*** This bug has been marked as a duplicate of bug 436286 ***
Comment 5 Maik Qualmann 2021-12-02 19:53:23 UTC
Git commit 1c5575647139ee20665e8b15e00ba59455c04fad by Maik Qualmann.
Committed on 02/12/2021 at 19:51.
Pushed by mqualmann into branch 'master'.

register Apple face info (apple-fi) namespace
Related: bug 436286
FIXED-IN: 7.4.0

M  +2    -2    NEWS
M  +2    -0    core/libs/metadataengine/engine/metaengine.cpp

https://invent.kde.org/graphics/digikam/commit/1c5575647139ee20665e8b15e00ba59455c04fad