Bug 320185

Summary: Compatibility issue with hierarchical tags between Digikam and WLPG (and perhaps other software).
Product: [Applications] digikam Reporter: kavish
Component: Metadata-XmpAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: bionardu, caulier.gilles
Priority: NOR    
Version: 3.1.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.0.0
Attachments: Test xmp made by Digikam
Test xmp made by WLPG.

Description kavish 2013-05-23 20:55:15 UTC
I'm using digikam 2.5.0 in Ubuntu 12.04 LTS (meanwhile changed to Kubuntu). My wife is keeping the same photo collection on a MS Windows box in WLPG. When I create hierarchical tags in Digikam, e.g. "people/Peter", this will show up in WLPG as a non hierarchical tag ("Peter"). When I go the other way around and create the tags in WLPG, everything is fine in Digikam. This forces me to do all editing and tagging on the Windows box, although I prefer to use Digikam.

After some more investigation I found that the problem might be in the Dublin Core xmp tags. Digikam is not saving the hierarchy in there. MS does, but that might be a MS specific way of doing. When googling on this, I found that some photo managers are doing the same, others with a different syntax and others just like Digikam.

So, perhaps this is not really a "bug" in Digikam, but just the result of using a standard (xmp) that leaves too much options for vendors to lock their users to their products. But knowing that doesn't solve the problem.

I would like to suggest to create a solution that allows to customize the way Digikam is using metadata tags. I realize that it wouldn't be a good idea to just open it for free manual editing, but how about a menu that allows the user to choose metadata compatibility with WLPG, Photo Shop or any other great photomanager, including the default "Digikam"? And perhaps also the same choice when exporting / importing photo's?

Reproducible: Always

Steps to Reproduce:
1. Create hierarchical tags on photos in Digikam.
2. Load the photos into WLPG and check the tags.
3. Try also to create such tags in WLPG see how that shows up in Digikam.
Actual Results:  
The best option to use both is editing all tags in WLPG only. When creating hierarchical tags in Digikam, the hierarchy is lost when the photos are loaded into WLPG.

Expected Results:  
Compatibility between both.

I'm not using the latest version of Digikam, but I didn't find any information that might suggest that this problem is solved meanwhile.
Comment 1 caulier.gilles 2013-05-24 04:42:12 UTC
WLPG ???

Please try with last 3.2.0 and try again. 2.5.0 is not maintained and very old now...

Gilles Caulier
Comment 2 kavish 2013-05-24 19:38:46 UTC
You really don't know WLPG, or are you just kidding? It is Window Live Photo Gallery. You are supporting Microsoft Photo xmp tags in Digikam, so I guess you know what it is.

I have a "very old" version of Digikam, because I have been using the latest Long Time Support version of Ubuntu for more than a year now and it just comes with that version.

Today I upgraded to Kubuntu 13.04 and that has Digikam 3.1.0 in its repository. Do I really have to upgrade even further? I prefer to use the repository if there is no really important reason for downloading and installing manually.

In version 3.1.0 I tried the same and it gives exactly the same results. Hierarchy is no longer visible when loading the photo into WLPG. The Dublin Core xmp tag has only the name and not people/name, like in the other tags.
Comment 3 caulier.gilles 2013-05-24 20:54:18 UTC
I know the real name, not WPLG...

M$ tags support have been already implemented by me in digiKam ! It have been done after 2.5.0...

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/dmetadata/dmetadata.cpp#L1188

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/dmetadata/dmetadata.cpp#L1256

Gilles Caulier
Comment 4 kavish 2013-05-25 21:47:01 UTC
Created attachment 80080 [details]
Test xmp made by Digikam

This xmp file is from a test making tags with Digikam 3.1.0. DC tag doesn't contain hierarchical info.
Comment 5 kavish 2013-05-25 21:49:14 UTC
Created attachment 80081 [details]
Test xmp made by WLPG.

This xmp file contains what Windows Live Photo Gallery makes if I try to add hierarchical tags. Here is the same hierarchical info in the DC tag.
Comment 6 kavish 2013-05-25 22:07:56 UTC
I attached two test xmp files, one made by Digikam and the other with WLPG. Please look at the difference in the DC tags.

I noticed Digikam adds Microsoft tags in order to be compatible. That looks OK. However, it looks like Windows Photo Gallery is overruling what is read in the M$ tags by what is found in the Dublin Core. I actually wonder if the Microsoft tags are really used. Perhaps they are only a sort of "M$ was here" sign, but that will be difficult to find out.

I start wondering if it was such a good idea at all to organize my photo collection using xmp tags. This doesn't look at all like a standard to help users, but more like a new way to make people stick with one vendor.
Comment 7 kavish 2013-06-22 13:50:39 UTC
Please check my latest posts. I know M$ tags are available in Digikam, but there is still a problem to be solved.
Comment 8 caulier.gilles 2013-11-21 22:39:15 UTC
*** Bug 318473 has been marked as a duplicate of this bug. ***
Comment 9 caulier.gilles 2013-11-22 13:56:39 UTC
This the differences between WLPG and digiKam Dublin Core subject tags from XMP :

WLPG :

   <dc:subject>
    <rdf:Bag>
     <rdf:li>Mensen/Klaas</rdf:li>
    </rdf:Bag>
   </dc:subject>

digiKam :

   <dc:subject>
    <rdf:Bag>
     <rdf:li>Klaas</rdf:li>
    </rdf:Bag>
   </dc:subject>

digiKam only has the keyword "Klaas", where WLPG has full hierarchy "Mensen/Klaas"

Gilles Caulier
Comment 10 caulier.gilles 2013-11-22 14:06:36 UTC
I see also that  MicrosoftPhoto:LastKeywordXMP tag is plug to XMP as a Bag, not a Seq by Microsoft...

Gilles Caulier
Comment 11 caulier.gilles 2013-11-22 14:12:46 UTC
Git commit 17e8f7a94877f08ca7749d6b94cb7c912fd76eba by Gilles Caulier.
Committed on 22/11/2013 at 14:11.
Pushed by cgilles into branch 'master'.

use XMP bag container for Xmp.MicrosoftPhoto.LastKeywordXMP tag instead a seq container.

M  +2    -2    libs/dmetadata/dmetadata.cpp

http://commits.kde.org/digikam/17e8f7a94877f08ca7749d6b94cb7c912fd76eba
Comment 12 caulier.gilles 2013-11-22 16:48:03 UTC
Kavish,

This is an example how LightRoom work to plug tag hierarchies to XMP Dublin Core :

   <dc:subject>
    <rdf:Bag>
     <rdf:li>Fosstun</rdf:li>
     <rdf:li>Places</rdf:li>
     <rdf:li>Torpa</rdf:li>
    </rdf:Bag>
   </dc:subject>
   <lr:hierarchicalSubject>
    <rdf:Bag>
     <rdf:li>Places|Torpa|Fosstun</rdf:li>
    </rdf:Bag>
   </lr:hierarchicalSubject>

It split hierarchy as keywords and store full tags path in lr:hierarchicalSubject

This is how Microsoft must do. In dc:subject we must store only selected keywords, as in old IPTC, not the full path. This is how digiKam work currently, and i don't want to change this, for compatibility with other photo management programs that we have already tested here, ad Aperture for ex...

Note that Microsoft store full tags path in MicrosoftPhoto:LastKeywordXMP instead of  lr:hierarchicalSubject. Each program use a dedicated XMP namespace, as also digiKAm wich have dedicated one where you can find the full Tags Path.

I think with my last commit your problem must be fixed, because a wrong XMP data container have been used to store Tags Path in MicrosoftPhoto:LastKeywordXMP.

In others words, i will not perform more change here...

Gilles Caulier