Bug 511092

Summary: System display color profile is not used correctly
Product: [Applications] digikam Reporter: Sergey Salnikov <salsergey>
Component: ColorManagement-ProfilesAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: metzpinguin
Priority: NOR    
Version First Reported In: 8.8.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 8.9.0
Sentry Crash Report:
Attachments: log with swapped colors

Description Sergey Salnikov 2025-10-25 13:06:24 UTC
SUMMARY

In version 8.8.0 digiKam don't actually use my system color profile (I use X11). In settings is tells that system profile is used (it's grayed out so I can't choose another one manually). However, it looks like sRGB profile is used instead. Colors are a bit different from other applications such as gwenview or darktable (but are the same if I set sRGB as display profile in darktable). In digiKam 8.7.0 color profile was applied as intended.

I conducted some research and have found that reverting commit 'af6f0afe' from 2025-10-11 seems to fix the problem for me.

STEPS TO REPRODUCE
1. Launch digiKam and check colors of the images (thumbnails or original images).
2. Compare with other color-corrected applications (darktable, gwenview, GIMP).

OBSERVED RESULT
Colors in digiKam are different from other apps.

EXPECTED RESULT
Colors are the same as in other color-corrected apps.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.3.6
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Comment 1 Maik Qualmann 2025-10-25 13:12:36 UTC
If digiKam grays out the box, it has detected a color profile installed on the system and is now using it. You need to set your system profile to the one you want. If you previously used a different profile in digiKam, the result was incorrect, because system profile != idigiKam profile.

Otherwise, remove the system profile and you can select one again in digiKam.

Maik
Comment 2 Maik Qualmann 2025-10-25 13:14:08 UTC

*** This bug has been marked as a duplicate of bug 509534 ***
Comment 3 Sergey Salnikov 2025-10-25 13:28:00 UTC
My understanding is that it could be a different bug.

My problem is not inability to choose color profile in digiKam. The system profile is set and used by all other applications (and I believe they use it in the right way). digiKam 8.8.0 also tells that it uses system color profile, but the resulting colors are different from all other applications. Colors are also different from digiKam 8.7.0 that also used system color profile.
Comment 4 Maik Qualmann 2025-10-25 13:41:56 UTC
Do you have multiple screens?

Maik
Comment 5 Sergey Salnikov 2025-10-25 13:47:52 UTC
No, only one screen.
Comment 6 Maik Qualmann 2025-10-25 14:12:27 UTC
I can't reproduce the error here. I've enabled the test profile with red/green swapped in the color management (colord-kde) under Plasma6. digiKam correctly recognizes it in the system and applies it to the image/thumbnail.
Please post the debug output from starting digiKam, as described here:

https://www.digikam.org/contribute/#linux-host

Maik
Comment 7 Sergey Salnikov 2025-10-25 14:38:25 UTC
Created attachment 186136 [details]
log with swapped colors

Well, that's strange. If I start digiKam after export QT_LOGGING_RULES="digikam*=true", color profile works (tested with swapped colors as well). But if I export QT_LOGGING_RULES="digikam*=false" and start digiKam again, color profile doesn't work. Attach my log.
Comment 8 Maik Qualmann 2025-10-25 14:59:23 UTC
Okay, that's strange. I always have internal debugging enabled in the digiKam settings. If I disable it, I no longer get a red/green swaped
image with the test color profile. Wow...

Maik
Comment 9 Sergey Salnikov 2025-10-25 15:06:43 UTC
As I mentioned in the first message, reverting commit 'af6f0afe' from 2025-10-11 fixes the problem for me (I have Qt 6.9.2). Maybe it could help to find the actual reason.
Comment 10 Maik Qualmann 2025-10-25 15:25:51 UTC
Git commit aa1445ca41fb33a6d2a8674bb332ef36973d6dfb by Maik Qualmann.
Committed on 25/10/2025 at 15:24.
Pushed by mqualmann into branch 'master'.

fix use color profile memory after XFree()
QByteArray::fromRawData() does not make a deep copy of the data.
FIXED-IN: 8.9.0

M  +1    -1    NEWS
M  +1    -1    core/libs/dimg/filters/icc/iccsettings_p_x11.cpp

https://invent.kde.org/graphics/digikam/-/commit/aa1445ca41fb33a6d2a8674bb332ef36973d6dfb
Comment 11 Maik Qualmann 2025-10-25 15:30:28 UTC
Git commit 177f1bc9a11c78f2cafdee49282da3180fc035cc by Maik Qualmann.
Committed on 25/10/2025 at 15:29.
Pushed by mqualmann into branch 'master'.

polish get QByteArray

M  +1    -1    core/libs/dimg/filters/icc/iccsettings_p_x11.cpp

https://invent.kde.org/graphics/digikam/-/commit/177f1bc9a11c78f2cafdee49282da3180fc035cc