Bug 508042 - Setting some ColorLabel does not work
Summary: Setting some ColorLabel does not work
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Colors (other bugs)
Version First Reported In: 8.8.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-09 08:48 UTC by mahikeulbody
Modified: 2025-08-09 13:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.8.0
Sentry Crash Report:


Attachments
pixel 5 file (2.28 MB, image/jpeg)
2025-08-09 09:04 UTC, mahikeulbody
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mahikeulbody 2025-08-09 08:48:44 UTC
Setting red, yellow, blue, magenta* or green color label work but
setting orange, grey, black or white color label does not work : it stays to None or it reset it to None if one was present.

Filtering on color label and checking the file with exiftool confirm that.

Color label Metadata configuration :
read : xmp.xmp.label
write : xmp.xmp.label

* magenta is displayed as purple by exiftool
[XMP-xmp]       Label                           : Purple
Comment 1 caulier.gilles 2025-08-09 08:55:45 UTC
Do you uses XMP sidecar ?
The metadata backend is Exiv2 or ExifTool ?
Which image file format is affected ?

Please share samples to reproduce.

Best
Gilles Caulier
Comment 2 mahikeulbody 2025-08-09 09:03:36 UTC
no XMP sidecar
exiftool to read and write metadata
I tried just with jpeg

see the file attached (I set red as an example)
Comment 3 mahikeulbody 2025-08-09 09:04:20 UTC
Created attachment 183902 [details]
pixel 5 file
Comment 4 Maik Qualmann 2025-08-09 09:05:15 UTC
The unassignable color labels are color labels that belong to the text labels of Xmp.xmp.Label. These are usually deleted when assigned. Therefore, I suspect that your images are read-only, the metadata cannot be changed, or you are only writing in sidecars and the color labels are present in the image metadata.
Assigning all color labels works without any problems here.

Maik
Comment 5 mahikeulbody 2025-08-09 09:08:53 UTC
The image is not read-only (I checked it) and some colors work (checked with exiftool). I have no sidecar.

NB. I am using the last 8.8 AppImage.
Comment 6 Maik Qualmann 2025-08-09 09:12:09 UTC
I'm using the latest version of Windows and have no problems with your image. Tested with Exiv2 and ExifTool in read/write mode.

Maik
Comment 7 Maik Qualmann 2025-08-09 09:14:29 UTC
Oh, I see you're only using xmp.xmp.label, which doesn't work. You always have to read and write the digiKam color label as well. Because xmp.xmp.label is limited and doesn't support all colors.

Maik
Comment 8 mahikeulbody 2025-08-09 09:20:52 UTC
Understood. Thanks.

May be you could add a warning into the color label metadata setting panel to notify the user.
Comment 9 Maik Qualmann 2025-08-09 09:27:19 UTC
Hmm, I'd rather add the missing colors as text, so other programs can see what they're doing with it. What do you think, Gilles? Should we just extend xmp.xmp.label and ignore the current standard?

Maik
Comment 10 Maik Qualmann 2025-08-09 09:33:36 UTC
There are interesting threads on this topic on the web, LR itself is incompatible with itself, in the German version the color labels are translated and cannot be read by the English LR version.

Maik
Comment 11 mahikeulbody 2025-08-09 09:35:00 UTC
According to the way xmp-xmp:colorlabel is defined in the standard, there is no strict list enforced — only in [Adobe] application conventions. So it seems it should be possible to extend it without problem.
Comment 12 mahikeulbody 2025-08-09 09:36:32 UTC
I read somewhere that "If you want interoperable values, you should stick to the standard Adobe set in English unless you know all consumers share the same mapping."
Comment 13 mahikeulbody 2025-08-09 10:10:57 UTC
There is a similar problem with pick label :
into [XMP-digiKam]   Pick Label
set rejected    =>     1
set pending    =>     2
set accepted  =>      3

into [XMP-xmpDM]     Pick
set rejected    =>  -1
set pending    => no metadata writed
set accepted  => 1

I have not tried to read a file with only  XMP-xmpDM:Pick set in order to check which Pick Label is displayed.
Comment 14 Maik Qualmann 2025-08-09 13:48:57 UTC
Git commit 720ef4dbe7e1060a354beb8675340cf04858b9f8 by Maik Qualmann.
Committed on 09/08/2025 at 13:48.
Pushed by mqualmann into branch 'master'.

add all digiKam color label as text metadata entry
FIXED-IN: 8.8.0

M  +1    -1    NEWS
M  +17   -0    core/app/utils/digikam_globals.h
M  +6    -62   core/libs/metadataengine/dmetadata/dmetadata_labels.cpp

https://invent.kde.org/graphics/digikam/-/commit/720ef4dbe7e1060a354beb8675340cf04858b9f8
Comment 15 Maik Qualmann 2025-08-09 13:54:54 UTC
For the labels "pick" and "Good" we cannot support anything else, because ExifTool does not support anything else. We even had to adapt to the case sensitivity for "Good" for True and False.

Maik