Bug 339961 - HUB : Add Windows Photo Gallery / Windows Explorer Hierarchical tags support
Summary: HUB : Add Windows Photo Gallery / Windows Explorer Hierarchical tags support
Status: RESOLVED INTENTIONAL
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Hub (show other bugs)
Version: 4.4.0
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-14 15:25 UTC by Antoine Chauveau
Modified: 2016-12-06 21:04 UTC (History)
2 users (show)

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


Attachments
Sample image for step 1, photo tagged in Windows Photo Gallery (73.78 KB, image/jpeg)
2014-10-14 15:27 UTC, Antoine Chauveau
Details
Sample image for step 3, photo edited in Digikam (74.94 KB, image/jpeg)
2014-10-14 15:28 UTC, Antoine Chauveau
Details
Xmp.dc.subject.png (170.20 KB, image/png)
2016-12-04 20:04 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Chauveau 2014-10-14 15:25:31 UTC
There is an issue where Windows Photo Gallery / Windows Explorer can't read hierarchical tags written by Digikam. Interoperability in the other direction works fine.

Reproducible: Always

Steps to Reproduce:
1. Create a file with hierarchical tags in Windows Photo Gallery
2. Import into Digikam. This works just fine.
3. Execute "Write Metadata to Images" in Digikam.

Actual Results:  
Open the file from Step 3. in Windows Photo Gallery. The tag hierarchy is lost, only leaf tags remain.
Look in Windows Explorer. The same information loss is visible in tooltips and details view.

Expected Results:  
Hierarchical tags are still visible in Photo Gallery and Explorer.

Digikam stores only leaf nodes under XMP-dc "Subject", the field that Photo Gallery and Explorer read in priority. The complete hierarchy is stored in other fields but that doesn't help these apps.

Digikam also writes leaves-only data to a new field IPTC "Keywords", but I assume that Photo Gallery doesn't care since XMP data is present too.
Comment 1 Antoine Chauveau 2014-10-14 15:27:59 UTC
Created attachment 89128 [details]
Sample image for step 1, photo tagged in Windows Photo Gallery
Comment 2 Antoine Chauveau 2014-10-14 15:28:41 UTC
Created attachment 89129 [details]
Sample image for step 3, photo edited in Digikam
Comment 3 caulier.gilles 2014-10-14 15:40:57 UTC
Where Windows Photo Gallery / Windows Explorer store full tag hierarchies in XMP ?

Gilles Caulier
Comment 4 Antoine Chauveau 2014-10-14 15:46:36 UTC
In the Step 1 example file Photo Gallery created these full hierarchies in XMP-dc "Subject" and  XMP-microsoft "Last Keyword XMP". The app also updates some other locations if they already exist.
Comment 5 caulier.gilles 2016-03-07 06:54:47 UTC
This entry is illegible for GSoC 2016 project  :

https://community.kde.org/GSoC/2016/Ideas#Project:_digiKam_MetadataHub_improvements
Comment 6 Maik Qualmann 2016-12-02 17:47:59 UTC
Windows Photo Gallery stores tags path in "Exif.Image.XPKeywords". This field is with libexiv2 read only. I have checked it, write to "Exif.Image.XPKeywords" is not possible with libexiv2. DigiKam can do nothing here and it will probably not change.

http://dev.exiv2.org/boards/3/topics/530

Maik
Comment 7 Antoine Chauveau 2016-12-04 19:04:00 UTC
Thanks for looking into this Maik.

I don't think that the read-only status of "Exif.Image.XPKeywords" matters here. As I stated in the bug description, the main field that Photo Gallery and Explorer read is not XPKeywords but XMP-dc "Subject". This is already written to by Digikam, and the main problem here is that Digikam only writes the node leaves in this field, and not the full hierarchical view.

Note that Photo Gallery will be end-of-life'd by Microsoft in Jan 2017, but the bug is still relevant since it also affects Windows 10's Explorer app.
Comment 8 Maik Qualmann 2016-12-04 20:04:21 UTC
Created attachment 102624 [details]
Xmp.dc.subject.png

Ok, I understand now. With digiKam5 you can craete a new XMP namespace. See screenshot.
1 disable default XMP.dc.subject
2 add new namespace
3 write XMP.dc.subject and set tags path seperator "/"
4 enable tags path

DigiKam now write a tags path to XMP.dc.subject.

Maik
Comment 9 Antoine Chauveau 2016-12-06 17:29:58 UTC
Thank you, configuring Digikam like you suggest (and also disabling reading and writing tags for all other namespaces) allows good interoperability with Explorer and Photo Gallery.

Note that the example in attachment 102624 [details] wasn't complete, I also had to set "Special Options" in this dialog to TAG_XMPBAG or nothing got written.

It is rather inconvenient that such advanced configuration is needed for my use case, but the fault is in the lack of a widely adopted standard for hierarchical tags and not in Digikam. I understand that Digikam defaults to writing Xmp.dc.subject according to the MWG's standard (http://www.metadataworkinggroup.org/specs), and that seems like a reasonable choice.