Bug 358193 - Color labels exported from LightRoom not recognized by digiKam
Summary: Color labels exported from LightRoom not recognized by digiKam
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Colors (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-19 01:15 UTC by LuHe
Modified: 2017-07-29 07:44 UTC (History)
1 user (show)

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


Attachments
All possible color tags for Lightroom and digiKam 5 beta 2 (1.44 MB, application/zip)
2016-01-25 02:39 UTC, LuHe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LuHe 2016-01-19 01:15:33 UTC
Digikam seems to store color labels in the following format:
Xmp.digiKam.ColorLabel                       XmpText     1  4

Some other popular photo management applications also have the possibility to assign color labels.
At least one of the bigger ones, Lightroom, uses XMP labels for that:
Xmp.xmp.Label                                XmpText     5  Green

Digikam seems only to handle the digikam-specific format, as can be seen in [digikam.git] / libs / dmetadata / dmetadata.cpp / DMetadata::getImageColorLabel()  ( https://quickgit.kde.org/?p=digikam.git&a=blob&h=75ccf96c4238616cb3d69e85f06ad0f2f5f83a2e&hb=aa0fa10634ca971fc6ba8bd2243b32c5a059a938&f=libs%2Fdmetadata%2Fdmetadata.cpp - line 495)

For compatibility reason, it should at least read the color tags in Xmp.xmp.Label

Reproducible: Always


Actual Results:  
Color labels not imported in digikam, no green border for "good" images

Expected Results:  
Color labels of popular applications recognized
Comment 1 caulier.gilles 2016-01-19 17:36:51 UTC
Its can be easy to parse Xmp.xmp.Labels tag to import in DK database, but this string value can has more than one sence, as explained here :

http://www.fastrawviewer.com/usermanual/program-settings/xmp

So, please, if you have a LR available, try all combinaisons and list all values to handle in DMetadata.

Gilles Caulier
Comment 2 caulier.gilles 2016-01-19 17:37:35 UTC
Also, other question : this XMP tags string is not internationalized i hope, else this will be the hell...

Gilles Caulier
Comment 3 caulier.gilles 2016-01-19 17:39:41 UTC
If i'm not too wrong, this labels strings are customizable in LR :

http://www.photometadata.org/META-Tutorials-Photo-Mechanic-Setting-Metadata-Preferences

Right ? If yes, so only the default values can be handle in DMetadata.

Gilles Caulier
Comment 4 LuHe 2016-01-20 04:34:09 UTC
This seems to be the description of another program, I've found no way to make them configurable in Lightroom.

For the time being, I use this horrible script to sync the color labels: https://gist.github.com/lukas-hetzenecker/1cc07f05b9a45e3e7255
Comment 5 caulier.gilles 2016-01-20 04:43:32 UTC
Ok, thanks for the script.

Can you share some image samples with different label tag values to test DK import from LR ?

Thanks in advance

Gilles Caulier
Comment 6 LuHe 2016-01-25 02:39:26 UTC
Created attachment 96821 [details]
All possible color tags for Lightroom and digiKam 5 beta 2
Comment 7 LuHe 2016-01-25 02:48:21 UTC
Sorry it took so long - i have attached a compressed file which contains all valid color tags for Lightroom and digiKam 5 beta 2.

I think it would be best if the assignment of the colors to the tags would be configurable - so that digikam allows to both read and write color tags into different sets of metadata. Just like comments, ratings and tags are configurable now (awesome feature by the way, thanks for this great work!).

The use case for this is that the images are managed by different people using different applications - so it would be great if a 2-way synchronization between these tools were possible.
Comment 8 caulier.gilles 2016-01-30 17:32:53 UTC
Git commit 9e9c15343489796807f2f4420ae521326a00e9a9 by Gilles Caulier.
Committed on 30/01/2016 at 17:32.
Pushed by cgilles into branch 'master'.

add rules to be able to import/export color labels from Adobe LightRoom to/from digiKam
FIXED-IN: 5.0.0

M  +2    -1    NEWS
M  +58   -0    libs/dmetadata/dmetadata.cpp

http://commits.kde.org/digikam/9e9c15343489796807f2f4420ae521326a00e9a9
Comment 9 caulier.gilles 2016-01-30 17:35:14 UTC
Screenshot of import done :

https://www.flickr.com/photos/digikam/24711388405/in/dateposted-public/