Bug 347114

Summary: digiKam doesn't let me change the monitor color profile
Product: [Applications] digikam Reporter: DrSlony <bugs>
Component: ColorManagement-ProfilesAssignee: Digikam Developers <digikam-bugs-null>
Status: REPORTED ---    
Severity: normal CC: bugs, caulier.gilles, metzpinguin
Priority: NOR    
Version: 4.12.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: ColorHug device
latest.icc
eizo.icc

Description DrSlony 2015-05-03 17:42:58 UTC
The "Monitor profile" combobox is grayed out and inside it I see grayed out text "Monitor Profile From System Settings". I don't want to use that one, I want to specify a different one.

Reproducible: Always
Comment 1 caulier.gilles 2015-05-03 17:51:22 UTC
You must have monitor coor profiles in :

- defaults repositories
- customized repositories.

digiKam analyse directories and collect ICC profile types.

In others words, check your settings.

Gilles Caulier
Comment 2 caulier.gilles 2015-05-03 17:51:45 UTC
Note : I checked here, and all work fine for me.

Gilles Caulier
Comment 3 DrSlony 2015-05-03 18:07:14 UTC
$ find /usr/share/color/icc/ -iname "*.icc" -or -iname "*.icm"
/usr/share/color/icc/sRGB Gamma22.icc
/usr/share/color/icc/basICColor/PSO_LWC_Standard_bas.ICC
/usr/share/color/icc/basICColor/PSO_MFC_Paper_bas.ICC
/usr/share/color/icc/basICColor/PSO_Uncoated_NPscreen_ISO12647_bas.ICC
/usr/share/color/icc/basICColor/PSO_Uncoated_ISO12647_bas.ICC
/usr/share/color/icc/basICColor/PSO_Coated_NPscreen_ISO12647_bas.ICC
/usr/share/color/icc/basICColor/ISOcoated_v2_bas.ICC
/usr/share/color/icc/basICColor/PSO_LWC_Improved_bas.ICC
/usr/share/color/icc/basICColor/ISOcoated_v2_300_bas.ICC
/usr/share/color/icc/basICColor/PSO_SNP_Paper_bas.ICC
/usr/share/color/icc/basICColor/SC_paper_bas.ICC
/usr/share/color/icc/basICColor/LStar-RGB.icc
/usr/share/color/icc/basICColor/ISOuncoatedyellowish_bas.ICC
/usr/share/color/icc/basICColor/ISOcoated_v2_grey1c_bas.ICC
/usr/share/color/icc/basICColor/PSO_Coated_300_NPscreen_ISO12647_bas.ICC
/usr/share/color/icc/basICColor/ISOnewspaper_v4_26_bas.ICC
/usr/share/color/icc/Oyranos/Gray-CIE_L.icc
/usr/share/color/icc/Oyranos/ITULab.icc
/usr/share/color/icc/Oyranos/Gray_linear.icc
/usr/share/color/icc/OpenICC/sRGB.icc
/usr/share/color/icc/OpenICC/compatibleWithAdobeRGB1998.icc
/usr/share/color/icc/OpenICC/ProPhoto-RGB.icc
/usr/share/color/icc/lcms/XYZ.icc
/usr/share/color/icc/lcms/LCMSXYZI.ICM
/usr/share/color/icc/lcms/LCMSLABI.ICM
/usr/share/color/icc/lcms/Lab.icc
/usr/share/color/icc/latest.icc
$ find /usr/local/share/color/icc/ -iname "*.icc" -or -iname "*.icm"
find: `/usr/local/share/color/icc/': No such file or directory
$ find ~/.local/share/color/icc/ -iname "*.icc" -or -iname "*.icm"
/home/drslony/.local/share/color/icc/devices/Display/Goldstar Company Ltd 32LG3000 _edid.icc
$ find ~/.local/share/icc/ -iname "*.icc" -or -iname "*.icm"
/home/drslony/.local/share/icc/latest.icc
/home/drslony/.local/share/icc/edid-4b1b2add77ab6bf89a00ac3507824588.icc
/home/drslony/.local/share/icc/HSD173PUW1 2014-05-06 2.2 M-S 3xCurve+MTX.icc
/home/drslony/.local/share/icc/edid-a8e1f82d3e14de02e78c7177ecb99e22.icc
/home/drslony/.local/share/icc/edid-486e3252e581f3ea2b4fbd23b3147e67.icc

http://i.imgur.com/eyhepPf.png
Seems that when it detects one in "system settings" then it doesn't let me choose a different one.
Comment 4 DrSlony 2015-05-04 12:56:10 UTC
Re-opening since obviously a valid bug or bad design choice.
Comment 5 Maik Qualmann 2015-05-04 21:30:53 UTC
You're using a system-wide color management, as colord / colord-kde. Go to the KDE settings and disable this.

Maik
Comment 6 DrSlony 2015-05-05 05:48:32 UTC
Confirmed that when I disable (actually, I removed them, for other reasons) oyranos/kolor-manager then digiKam let me choose one manually.

It would be good for the user if he/she could change the used profile in digiKam without having to disable the system-wide CMS. If that is not possible, then a tooltip, explaining that to change the monitor profile used by digiKam the system CMS needs to be disabled, would be helpful and time-saving.
Comment 7 DrSlony 2015-05-05 05:50:08 UTC
P.S. Though I had them installed, Oyranos/Kolor-Manager don't even work in Plasma 5, yet their being installed prevented me from changing the profile used by digiKam. Just one of the arguments why keeping it this way is bad.
Comment 9 DrSlony 2015-08-31 12:07:06 UTC
This is still valid and still a big problem with a simple solution - a filechooser.

digiKam-4.12.0, the "Monitor profile" drop-down is grayed-out, I can't set a monitor profile.
I don't have (or want) oyranos or kolor-manager installed.
Comment 10 DrSlony 2015-08-31 12:07:24 UTC
http://i.imgur.com/LPSYxVG.png
Comment 11 Maik Qualmann 2015-09-02 19:03:39 UTC
Use you digiKam 4.12 under KF5 desktop? In a test here on openSUSE in VirtualBox with KF5 and digikam 4.11 works the selecting of monitor profiles. I suspect that a system Color Manager runs.

Maik
Comment 12 DrSlony 2015-09-03 05:18:39 UTC
It used to work in 4.11, now in 4.12 (or because of some plasma/frameworks upgrade) it does not. I repeat, I don't have any color manager installed.

This is just one more reason for not doing "smart" things and letting the user choose a file from disk manually.
Comment 13 caulier.gilles 2015-09-03 07:43:09 UTC
There is no special changes to Color Management between digiKam 4.11 and 4.12.

Perhaps you have switched from LCMS1 to LCMS2. digiKam support both library.

Mine work very well with my monitors color profile calibrated with an external device :

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

Gilles Caulier
Comment 14 DrSlony 2015-09-03 08:10:33 UTC
I'm using LCMS-2.7 now, and I've been using generally LCMS2 for a long time.
http://i.imgur.com/BObe75M.png

I understand that you are reluctant to change something which works for you, but please understand that not everybody can or wants to use oyranos/kolor-manager and having a "manual override" would be the easy solution.
Comment 15 caulier.gilles 2015-09-03 08:13:35 UTC
But i don't use oyranos/kolor-manager, as i know (here Mageia5)

Gilles Caulier
Comment 16 DrSlony 2015-09-03 08:23:37 UTC
I triple-checked, I don't have colord, oyranos or kolor-manager installed. What else can I check?
I will try again in 4.13.0 as soon as it's released.
Comment 17 caulier.gilles 2015-09-03 08:25:43 UTC
Created attachment 94366 [details]
ColorHug device

I use ColorHug device plus the dedicated live CD. I don't use host Linux to calibrate my screens. Like this i don't use any settings on my hosts linux to handle CM in background.

Gilles Caulier
Comment 18 caulier.gilles 2015-09-03 08:31:14 UTC
Perhaps your ICC monitor profile files are not annotated as "monitor" profile (.ICM) in metadata.

Mine, for my monitor, generated with ColorHug, are hosted in this directory :

[gilles@localhost ImpressionPano]$ pwd
/home/gilles/Documents/ICCPROFILES/ImpressionPano

And ExifTool show file as Monitor profile :

[gilles@localhost ImpressionPano]$ exiftool 27EA33_0.0\ 2013-10-02\ max\ D5000\ min\ natif\ 2.2\ HQ\ 3xCurve+MTX.icc 
ExifTool Version Number         : 9.70
File Name                       : 27EA33_0.0 2013-10-02 max D5000 min natif 2.2 HQ 3xCurve+MTX.icc
Directory                       : .
File Size                       : 17 kB
File Modification Date/Time     : 2013:10:02 10:33:41+02:00
File Access Date/Time           : 2015:09:02 15:14:45+02:00
File Inode Change Date/Time     : 2015:03:15 13:05:56+01:00
File Permissions                : rw-rw-r--
File Type                       : ICC
MIME Type                       : application/vnd.iccprofile
Profile CMM Type                : argl
Profile Version                 : 2.2.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 2013:10:02 10:33:27
Profile File Signature          : acsp
Primary Platform                : Unknown (*nix)
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : 
Device Model                    : 
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Media-Relative Colorimetric
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : argl
Profile ID                      : b1e26f5bf9fc48bb830b47d5d8a24acf
Profile Description             : 27EA33_0.0 2013-10-02 max D5000 min natif 2.2 HQ 3xCurve+MTX
Profile Copyright               : Created with dispcalGUI 0.8.9.3 and Argyll CMS 1.4.0
Device Mfg Desc                 : Goldstar Company Ltd
Device Model Desc               : 27EA33
Luminance                       : 0 107.1703 0
Media White Point               : 0.79776 1 0.83279
Media Black Point               : 0.00433 0.00494 0.00517
Colorant Count                  : 3
Colorant 1 Name                 : Red
Colorant 1 Coordinates          : 12834 6357 58
Colorant 2 Name                 : Green
Colorant 2 Coordinates          : 13462 24093 596
Colorant 3 Name                 : Blue
Colorant 3 Coordinates          : 5638 2643 26713
Red Matrix Column               : 0.38873 0.19012 -0.00337
Green Matrix Column             : 0.40755 0.7337 0.01312
Blue Matrix Column              : 0.16792 0.07617 0.81516
Red Tone Reproduction Curve     : (Binary data 524 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 524 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 524 bytes, use -b option to extract)
Char Target                     : (Binary data 13193 bytes, use -b option to extract)
Warning                         : Invalid Metadata data
Make And Model                  : (Binary data 40 bytes, use -b option to extract)
[gilles@localhost ImpressionPano]$ 

Note : I set /home/gilles/Documents/ICCPROFILES/ path in CM config dialog from digiKam. Look well my settings.

Gilles Caulier
Comment 19 caulier.gilles 2015-09-03 08:32:14 UTC
Note : There is no difference between 4.12 and future 4.13 about color management, as i know...

This must work well with 4.12.0

Gilles Caulier
Comment 20 DrSlony 2015-09-03 08:49:20 UTC
I use a Huey with argyllcms and dispcalGUI.

I store the profile in /usr/share/color/icc/latest.icc

exiftool /usr/share/color/icc/latest.icc 
ExifTool Version Number         : 10.00
File Name                       : latest.icc
Directory                       : /usr/share/color/icc
File Size                       : 546 kB
File Modification Date/Time     : 2015:05:07 14:03:39+02:00
File Access Date/Time           : 2014:09:14 19:17:42+02:00
File Inode Change Date/Time     : 2015:05:07 14:03:39+02:00
File Permissions                : rw-r--r--
File Type                       : ICC
File Type Extension             : icc
MIME Type                       : application/vnd.iccprofile
Profile CMM Type                : argl
Profile Version                 : 2.2.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 2015:05:06 15:36:52
Profile File Signature          : acsp
Primary Platform                : Unknown (*nix)
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : 
Device Model                    : 
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : argl
Profile ID                      : fbe785e1e696ffa7648e82861e97c2ba
Profile Description             : HSD173PUW1 2015-05-06 2.35 M-S XYZLUT+MTX
Profile Copyright               : No copyright. Created with dispcalGUI 3.0.0.0 and Argyll CMS 1.7.0
Device Model Desc               : HannStar Display Corp HSD173PUW1
Luminance                       : 0 113.1743 0
Media White Point               : 0.92873 1 1.48032
Media Black Point               : 0.00212 0.00157 0.00349
Colorant Count                  : 3
Colorant 1 Name                 : Red
Colorant 1 Coordinates          : 12826 7358 464
Colorant 2 Name                 : Green
Colorant 2 Coordinates          : 13748 21885 2348
Colorant 3 Name                 : Blue
Colorant 3 Coordinates          : 5238 3701 24321
Video Card Gamma                : (Binary data 1554 bytes, use -b option to extract)
A To B0                         : (Binary data 240250 bytes, use -b option to extract)
B To A0                         : (Binary data 241786 bytes, use -b option to extract)
Red Matrix Column               : 0.39603 0.22824 0.01694
Green Matrix Column             : 0.41473 0.67636 0.08015
Blue Matrix Column              : 0.15344 0.0954 0.72781
Red Tone Reproduction Curve     : (Binary data 524 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 524 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 524 bytes, use -b option to extract)
Char Target                     : (Binary data 71631 bytes, use -b option to extract)
A To B1                         : (Binary data 240250 bytes, use -b option to extract)
B To A1                         : (Binary data 241786 bytes, use -b option to extract)
Chromaticity Channels           : 3
Chromaticity Colorant           : Unknown (0)
Chromaticity Channel 1          : 0.5948 0.35866
Chromaticity Channel 2          : 0.31032 0.59152
Chromaticity Channel 3          : 0.14453 0.08237
Warning                         : Invalid Metadata data

digiKam reports that /usr/share/color/icc is scanned.

The profile works fine when I load it using "argyll-dispwin /usr/share/color/icc/latest.icc" or in RawTherapee.

I will create a new monitor color profile using dispcalGUI-3.0.4.1 and argyllcms-1.2 later today.

But all this is irrelevant, as digiKam won't let me choose anything in the combobox - it's grayed out. http://i.imgur.com/SbVa9Kw.png
Comment 21 caulier.gilles 2015-09-03 09:01:28 UTC
Combobox is grayed out because it has not detected a monitor color profile in your collection.

Combobox is not populated and still empty. So it's grayed out.

Gilles Caulier
Comment 22 DrSlony 2015-09-03 09:06:41 UTC
It must be a bug. I've been using this profile for months, it worked in previous digiKam versions. My request is that a filechooser is added so that users can point digiKam to a file anywhere on disk, not only in "scanned" directories.
Comment 23 caulier.gilles 2015-09-03 09:23:42 UTC
Can you attach the monitor color profile file to this report to be able to check on my computer ?

Gilles Caulier
Comment 24 DrSlony 2015-09-03 09:39:39 UTC
Created attachment 94368 [details]
latest.icc
Comment 25 DrSlony 2015-09-03 09:39:58 UTC
Created attachment 94369 [details]
eizo.icc
Comment 26 Maik Qualmann 2015-09-03 10:30:13 UTC
The "Monitor Profile" combobox is only grayed out when digikam detects an installed system color profile.

(In reply to DrSlony from comment #20)
> I use a Huey with argyllcms and dispcalGUI.

It's clear you have a color manager installed. I think digikam can not simply override the color profile. DigiKam would probably support the API of the color manager.

Maik
Comment 27 DrSlony 2015-09-03 11:08:15 UTC
1- How do you define "an installed system color profile"?
2- Where does digiKam check for one?

I've had dispcalGUI and ArgyllCMS installed for years, digiKam worked fine before. 
3- Those two programs being installed is no reason to disable that combobox. There is just no logical connection there.
4- I have no profile or calibration "loaded" or "installed".
5- Even if I did, even when a profile is installed all that happens is that the calibration is loaded into the video LUT. This is not a reason to disable the combobox. Using calibration curves is only part of the process, the other part is having the software actually use the monitor profile and the user should be able to select any ICC file on disk for that.
Comment 28 caulier.gilles 2015-09-03 11:53:58 UTC
Look in source code :

Main cpp file managing CM setup page is here :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/setup/setupicc.cpp

The combobox hosting monitor profile settings is this one :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/setup/setupicc.cpp#L371

Look like we check if a monitor profile is set in window manager (X11 under Linux). If it's not the case, we set the monitor color profile detected at scan time, else the combox box is cleared and we indicate that monitor CM is performed by window manager :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/utilities/setup/setupicc.cpp#L712

To resume : if you have set a monitor CM by Window Manager, you must turn off this settings to be able to use a dedicated one in digiKam. You cannot turn off this settings by digiKam. This must be by end user. Also, it's not logic to cumulate CM from WM and DK. This will generate color artifacts everywhere.

As i said prefiously, this code has not changed since a while. We don't introduce a bug here. You must search in another place from your compter settings.

Gilles Caulier
Comment 29 DrSlony 2015-09-03 12:19:37 UTC
"As i said prefiously, this code has not changed since a while. We don't introduce a bug here."
Then the design is flawed, since I have no monitor profile installed and yet it doesn't work. The design seems to rely on monitorProfileFromSystem, and if it is set then it does not let the user override that.

Again, what I am suggesting is you give *power to the user*, not to the unreliable detection mechanism, and let the user decide whether the "installed" profile should be used (whatever "installed" means), or whether the profile chosen by the user via QFileDialog should be used.
I am suggesthing this:
The combobox should list all automatically detected monitor profiles, and a monitorProfileFromSystem option, and a QFileDialog option. It must be up to the user which one (s)he chooses, always power to the user.
 
"if you have set a monitor CM by Window Manager, you must turn off this settings to be able to use a dedicated one in digiKam"
How would I have a monitor CM set by Window Manager? I don't have oyranos or colord or kolor-manager installed.
Where does monitorProfileFromSystem get set?
What are KU and KC?
Comment 30 caulier.gilles 2015-09-03 12:43:49 UTC
This is the documentation of monitorProfileFromSystem() :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/dimg/filters/icc/iccsettings.h#L70

And the implementation which call a private method to check if a profile is assigned to a monitor :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/dimg/filters/icc/iccsettings.cpp#L191

Gilles Caulier
... where
Comment 31 DrSlony 2015-09-03 18:00:32 UTC
Thank you.
No _ICC_PROFILE* environment variable is set, no color manager is installed.
Comment 32 Marcel Wiesweg 2015-09-04 18:33:14 UTC
This is not an environment variable, it's an X11 atom.
You can check it with
xprop -root  | grep ICC

I have dispwin set up to load my profile at startup. It sets the atom and loads the system calibration tag to the graphics card, if the profile has this.
Comment 33 DrSlony 2015-09-04 19:53:44 UTC
$ xprop -root | grep ICC | head -c 128
_ICC_PROFILE(CARDINAL) = 0, 8, 135, 64, 97, 114, 103, 108, 2, 32, 0, 0, 109, 110, 116, 114, 82, 71, 66, 32, 88, 89, 90, 32, 7, 2

It looks like one is set. I haven't touched color settings in many months, I wonder why now digiKam doesn't let me use the combobox but earlier it did.
Set or not, I would still urge you to consider implementing my suggestion from #c29 as its simple, intuitive and would avoid this messy situation.
Comment 34 Marcel Wiesweg 2015-09-05 11:11:50 UTC
If some tool set the X atom, it should have honoured the vcgt tag, and loaded it to the graphics card's LUT. If you choose another profile from digikam although the atom is set, it will not change the LUT, so you have wrong colors. The atom is not a noncommittal hint.
Sorry, if "something" is active on your system and determines the monitor profile, please fix this "something". If you dont find it, set up dispwin to load your profile at startup. If you are unsure if the correct profile is loaded, you can check with dispwin -V:

dispwin -V /home/marcel/Software/System/color/Tuxedo-Laptop.icc 
Verify: '/home/marcel/Software/System/color/Tuxedo-Laptop.icc' IS loaded (discrepancy 0.0%)
Comment 35 Marcel Wiesweg 2015-09-05 11:16:44 UTC
Please note: The only reason digikam has a combo box to choose the monitor profile at all is that KDE does not provide built-in color management configuration. This is something that should be set in the system settings for each connected monitor, and be available via DBUS calls or an API. Same for the paths to ICC file repositories.
Then, ideally, the output color conversion should not be done in digikam on the CPU, but in cooperation with KWin on the GPU.
All this does not exist, so digikam does it itself.
The settings that should be set in digikam itself are default workspace profile and some detail settings.
Comment 36 DrSlony 2015-09-05 12:01:16 UTC
The display calibration and the monitor profile are two separate things, but to have accurate colors the monitor profile must be used with the same calibration it was made under, if any.
dispwin -c loads a linear display calibration which is what I need for one profile on one monitor, and dispwin -L loads a calibration which I use for another profile on another monitor. It's nice that digiKam tries to be automatic, but the result is this mess where it doesn't let the user manually override the used profile just because some X atom is set.

All I need to do is run that one simple command in a terminal to switch which monitor colors should be accurate on. I don't need any oyranos or colord which have their own set of problems and limitations on KDE4 and don't even work on Plasma 5. I get accurate colors by simply loading (or unloading) the calibration as needed and then pointing each program to the monitor profile. Each program, except digiKam.

It's nice that a motorcycle has a button to turn the engine on, but sometimes you need a good old kickstart. I'm not asking you to add complicated things to the program, I'm asking you to make a simple manual override. It's 2015 and still the only reliable way I can set color management accurately and with certainty across all relevant programs is by doing it manually. Keep the "Monitor Profile From System Settings" option for people whom that satisfies, but add a QFileDialog. It's simple, it's not complicated, it's a fail-safe.
Comment 37 caulier.gilles 2020-08-02 14:47:25 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Best regards

Gilles Caulier