Bug 269418

Summary: Possibility of having the tag hierarchy also written in the Xmp.MicrosoftPhoto.LastKeywordXMP field
Product: digikam Reporter: hugotrip
Component: Tags-EngineAssignee: Digikam Developers <digikam-bugs-null>
Severity: wishlist CC: caulier.gilles
Priority: NOR    
Version: 2.0.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 2.0.0

Description hugotrip 2011-03-25 22:20:38 UTC
Version:           unspecified
OS:                Linux

As my pictures library is shared over network on a windows station, Windows Live Photo Gallery (WLPG) is used also.
When tagging in WLPG, the tag hierarchy, exported in Xmp.MicrosoftPhoto.LastKeywordXMP is well imported by Digikam, but when tagging in Digikam the tags hierarchy is exported in Xmp.digiKam.TagsList and in Xmp.lr.hierarchicalSubject, and the tag leaves only are exported in Xmp.dc.subject, but WLPG seems to be able to only import Xmp.dc.subject, and so, I lose the hierarchy when using Digikam to tag pictures.
Therefore I'd like to have the possibility in Digikam to automatically export the tag hierarchy of a picture in Xmp.MicrosoftPhoto.LastKeywordXMP.

Reproducible: Always

using exiv2, I've noted that the notations in Xmp.MicrosoftPhoto.LastKeywordXMP and Xmp.digiKam.TagsList are identical, so it looks like coding this wish could be done by simply copying the value of Xmp.digiKam.TagsList in Xmp.MicrosoftPhoto.LastKeywordXMP.
(there may be a trick because Xmp.digiKam.TagsList is a list Seq and Xmp.MicrosoftPhoto.LastKeywordXMP is a list Bag, but I don't think because you copy from seq to bag)
Comment 1 caulier.gilles 2011-03-28 13:26:38 UTC
Git commit fbe5efbb1041a5f3b7748d02b3d47ab9ae2062b5 by Gilles Caulier.
Committed on 28/03/2011 at 13:27.
Pushed by cgilles into branch 'master'.

support  Xmp.MicrosoftPhoto.LastKeywordXMP with Tags hierarchy for compatibility with Windows Live Photo Gallery
BUGS: 269418

M  +96   -1    NEWS     
M  +12   -2    libs/dmetadata/dmetadata.cpp     
D  +0    -103  project/NEWS.2.0.0-beta4     

Comment 2 hugotrip 2011-04-18 22:35:38 UTC
Thank you for the quick response, and sorry for answering so late.
I've tried the svn version of digikam, and it worked great, but unfortunately, it appears that windows live pĥoto gallery only writes on Xmp.MicrosoftPhoto.LastKeywordXMP, but doesn't read from it (so I don't get the use of this field).

Sorry for not having testing this before.

So now, I've mad some tests and also found a reference (http://msdn.microsoft.com/en-us/library/ee719963%28v=vs.85%29.aspx) about the functioning of windows live photo gallery : it only reads from Xmp.dc.subject, but it also writes on it the hierarchy.
So as Digikam only exports the tag leaves to Xmp.dc.subject, like many other applications (http://trac.yorba.org/wiki/HierarchicalTags) I'm guessing that Windows Live Photo Gallery behavior isn't standard enough to ask for writing hierarchy on Xmp.dc.subject...