Bug 197817 - digiKam should utilize _icc_profile X property
Summary: digiKam should utilize _icc_profile X property
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: ColorManagement-Profiles (show other bugs)
Version: 0.10.0
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-25 10:44 UTC by Milan Knížek
Modified: 2022-02-01 11:19 UTC (History)
2 users (show)

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


Attachments
_ICC_PROFILE not recognised by digiKam (555.74 KB, image/png)
2009-09-05 14:00 UTC, Milan Knížek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Knížek 2009-06-25 10:44:23 UTC
Version:           0.10.0 (using KDE 4.2.2)
OS:                Linux
Installed from:    Ubuntu Packages

When colour management is enabled and user specifically wishes so, digiKam should utilise _icc_profile property of X server, if exists.

If not, then it should fallback to user predefined display profile.

Refer to

http://burtonini.com/blog/computers/xicc

http://www.oyranos.org/wiki/index.php?title=ICC_Profiles_in_X_Specification_0.2

for more details.
Comment 1 Marcel Wiesweg 2009-08-31 20:30:22 UTC
SVN commit 1017858 by mwiesweg:

Implementation to read ICC profiles set system-wide according to ICC profiles
from X specification. Code taken gratefully from KOffice.

CCBUG: 197817

 M  +4 -0      digikam/CMakeLists.txt  
 M  +76 -0     utilities/imageeditor/canvas/iccsettings.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1017858
Comment 2 Marcel Wiesweg 2009-08-31 20:30:27 UTC
SVN commit 1017859 by mwiesweg:

Use profile returned from window system.
Cache profile per screen (if set or not set).
Marked as TODO for Windows and Mac (dont know the situation there).

CCBUG: 197817

 M  +28 -5     iccsettings.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1017859
Comment 3 Marcel Wiesweg 2009-08-31 20:31:14 UTC
Any hint how to test this (that is, how to set such a profile)?
Comment 4 Milan Knížek 2009-08-31 22:06:53 UTC
@Marcel
To set the property (you can use sRGB.icm for testing):
$ xicc /path/to/your/profiles/display_profile.icm

To check if it was set:
$ xprop -root | grep _ICC_PROFILE

The output should be a lot of numbers. If empty, then something's wrong.

There are also other tools (dispwin) which do more things at once: load VCGT to calibrate the monitor (video card, actually) and also set the profile to X property.

I will test myself - probably during the weekend.
Comment 5 Milan Knížek 2009-09-05 14:00:43 UTC
Created attachment 36718 [details]
_ICC_PROFILE not recognised by digiKam

While there are no options for getting the system monitor profile in the Settings, I assume it is supposed to work silently in the background.

However, it seems that _ICC_PROFILE property is ignored (digiKam svn 1020162, kipi-plugins 0.6.0, kde-4.2.2 in Ubuntu x64).

I used BRG.icc as the monitor profile set with xicc and sRGB as a monitor profile in digiKam Settings. If _ICC_PROFILE had priority above digiKam Settings, the images would be displayed with swapped colour channels like with EoG in the attachment.

Setting BRG.icc manually in the digiKam Settings works as expected -> ie. channels are swapped.
Comment 6 Marcel Wiesweg 2009-09-05 18:31:41 UTC
SVN commit 1020214 by mwiesweg:

Use _ICC_PROFILE as atom name. The specification itself says it is _ICC_Profile,
but though it should be right per definition (because it _is_ the specification),
obviously it's wrong, at least dispwin uses _ICC_PROFILE.

CCBUG: 197817

 M  +8 -5      iccsettings.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1020214
Comment 7 Marcel Wiesweg 2009-09-05 18:33:25 UTC
From where do I get this "xicc" tool? Dispwin completely messed up my display here and refuses to uninstall the profile it installed, and gives errors for every operation.
Comment 8 Milan Knížek 2009-09-05 19:07:46 UTC
It is part of the Ubuntu universe repository (Debian, too?). I am not sure, who actually maintains the code now, but a tar ball can be obtained here:

http://packages.ubuntu.com/jaunty/xicc

or directly at

http://archive.ubuntu.com/ubuntu/pool/universe/x/xicc/xicc_0.2.orig.tar.gz
Comment 9 Milan Knížek 2009-09-05 21:25:18 UTC
digiKam svn 1020214: it works now as expected. Thanks, Marcel.

As regards GUI: it would be nice to let the user know that digiKam found the "system" profile. E.g. the settings for the display profile could be greyed out and some message displayed instead.
Comment 10 Marcel Wiesweg 2009-09-11 18:32:25 UTC
SVN commit 1022381 by mwiesweg:

Signal in setup when system-wide monitor profile is set.

CCBUG: 197817

 M  +20 -1     imageeditor/canvas/iccsettings.cpp  
 M  +10 -2     imageeditor/canvas/iccsettings.h  
 M  +10 -2     setup/setupicc.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1022381
Comment 11 Milan Knížek 2009-09-13 10:28:02 UTC
Now it is fine, unless some one else objects it, I would consider this for SOLVED.

Thanks again, Marcel.
Comment 12 caulier.gilles 2009-09-13 11:08:15 UTC
Thanks for the feedback. I close this file now...

Gilles Caulier