After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732260 - eog displays desaturated colors when built with --with-cms
eog displays desaturated colors when built with --with-cms
Status: RESOLVED OBSOLETE
Product: eog
Classification: Core
Component: image viewer
unspecified
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-26 01:53 UTC by Horea Christian
Modified: 2021-06-19 08:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot exemplifying color difference (175.02 KB, image/jpeg)
2014-06-26 01:53 UTC, Horea Christian
Details

Description Horea Christian 2014-06-26 01:53:14 UTC
Created attachment 279277 [details]
screenshot exemplifying color difference

After calibrating my monitor (with dispcalGUI and setting the said profile via the GNOME settings manager, no problem with that) EOG started displaying very desaturated colors. See a question thread here: http://photo.stackexchange.com/questions/52140/per-application-color-management-under-gnome3

After trying multiple things out, apparently the problem lies with EOG - and if the monitor is managed and EOG is built with --with-cms it displays colors very weirdly. Emerging it withour --with-cms solves the issue. 

I am using GNOME via Gentoo, and I select --with-cms via the "lcms" USE flag on the media-gfx/eog package.

The Gentoo maintainers seem certain that this is unlikely to be a Portage/Gentoo implementation issue (see https://bugs.gentoo.org/show_bug.cgi?id=514498 )
Comment 1 Felix Riemann 2014-06-27 16:46:24 UTC
Well, compiling without the lcms USE flag will disable color management in eog and it will display the image unaltered as if the color spaces of your image and your monitor match perfectly.

Does your image have a color profile attached? If not it is most likely tagged to be in sRGB which can AFAIK look a bit desaturated or maybe your monitor profile is not entirely correct.

Can you run eog like this: EOG_DEBUG_IMAGE_DATA=1 EOG_DEBUG_LCMS=1 eog yourimage.jpg
and post the console output here. That way we can see what eog thinks about your image's colors.

Btw, if I remember correctly Chromium needs a special command line switch to do color profiling.
Comment 2 Horea Christian 2014-06-28 00:32:07 UTC
The output of the above command is:

#[0,141275 (0,141275)] eog-image.c:569 (check_for_metadata_img_format) Check image format for jpeg: ffd8 - length: 65535
[0,141397 (0,000122)] eog-metadata-reader-jpg.c:237 (eog_metadata_reader_jpg_consume) APPx or COM Marker Found: e1
[0,141424 (0,000027)] eog-metadata-reader-jpg.c:295 (eog_metadata_reader_jpg_consume) Read APP1 data, Length: 12330
[0,141447 (0,000023)] eog-metadata-reader-jpg.c:237 (eog_metadata_reader_jpg_consume) APPx or COM Marker Found: e2
[0,141471 (0,000024)] eog-metadata-reader-jpg.c:364 (eog_metadata_reader_jpg_consume) Read continuation of ICC data, length: 25586
[0,141758 (0,000287)] eog-metadata-reader-jpg.c:517 (eog_metadata_reader_jpg_get_icc_profile) JPEG has ICC profile

The attacted color profile is RT_sRGB (a RawTherapee version of sRGB - see here: http://rawpedia.rawtherapee.com/Color_Management#Output_Profile) but I get the same results with plain sRGB as well. 

The reasons why I am disinclined to believe that showing desaturated colors is the "right" way, are that:

a) RawTherapee does not display the colors as desaturated when I use sRGB for my working profile.

b) All other programs (including Nautilus) also do not display the colors thus desaturated.

c) Even without the lcms flag, the color calibration of my monitor does affect how images are displayed by EOG. 

I don't understand exactly how GNOME color manages things, but since all colors in all applications change when I apply a new monitor profile, I expect that this is done in the most simple and sensible way per-screen, and not per-application. My uninformed guess would be that EOG with lcms thus remaps my colors *twice* causing the drop in saturation. ??
Comment 3 Felix Riemann 2014-06-29 13:57:49 UTC
I am CCing Richard Hughes, GNOME's color management expert, maybe he can spot a problem.

(In reply to comment #2)
> The output of the above command is:
> 
> #[0,141275 (0,141275)] eog-image.c:569 (check_for_metadata_img_format) Check
> image format for jpeg: ffd8 - length: 65535
> [0,141397 (0,000122)] eog-metadata-reader-jpg.c:237
> (eog_metadata_reader_jpg_consume) APPx or COM Marker Found: e1
> [0,141424 (0,000027)] eog-metadata-reader-jpg.c:295
> (eog_metadata_reader_jpg_consume) Read APP1 data, Length: 12330
> [0,141447 (0,000023)] eog-metadata-reader-jpg.c:237
> (eog_metadata_reader_jpg_consume) APPx or COM Marker Found: e2
> [0,141471 (0,000024)] eog-metadata-reader-jpg.c:364
> (eog_metadata_reader_jpg_consume) Read continuation of ICC data, length: 25586
> [0,141758 (0,000287)] eog-metadata-reader-jpg.c:517
> (eog_metadata_reader_jpg_get_icc_profile) JPEG has ICC profile

This looks okay. eog has noticed the embedded color profile and shows no complaints that would have hindered color correction.

> The attacted color profile is RT_sRGB (a RawTherapee version of sRGB - see
> here: http://rawpedia.rawtherapee.com/Color_Management#Output_Profile) but I
> get the same results with plain sRGB as well.

Okay, so apparently it's a sRGB profile with improced color accuracy.
 
> The reasons why I am disinclined to believe that showing desaturated colors is
> the "right" way, are that:
> 
> a) RawTherapee does not display the colors as desaturated when I use sRGB for
> my working profile.

Have you set your display color profile in RawTherapee? There's a page in the settings window where you need to enter the path to your display profile. Or try the checkbox below that field, which should try to reuse the one set by the GNOME settings program for your display (similar to GIMP).

If not the output is I think dependent on the profile set as working profile (which was sRGB by default for me).

> b) All other programs (including Nautilus) also do not display the colors thus
> desaturated.

Nautilus does not do any color conversion from what I know. You can try with these pictures:

http://www.color.org/version4html.xalter

You can test your browsers with that page, but if you save the four image parts to disk you can try your applications against the images. If you get wrong colors (best visible in the upper-right and lower-left images) your application most likely doesn't do color management.

> c) Even without the lcms flag, the color calibration of my monitor does affect
> how images are displayed by EOG. 
> 
> I don't understand exactly how GNOME color manages things, but since all colors
> in all applications change when I apply a new monitor profile, I expect that
> this is done in the most simple and sensible way per-screen, and not
> per-application. My uninformed guess would be that EOG with lcms thus remaps my
> colors *twice* causing the drop in saturation. ??

From what I know selecting a color profile in GNOME settings can alter your display's gamma values according to the profile, so yes it is possible to alter all applications at once, but that occurs at the output stage without the application noticing and has limited capabilities.

To do color correction correctly however you need to know an image's source color profile. This is were applications have to act on their own, as the output stage doesn't know the image's color profile. eog for example extracts the profile from the image data and applies a color conversion from the image color space to the display colorspace (which is defined by the profile you set in the GNOME settings app). I am not sure whether the additional gamma correction at the output stage could have such an effect to your images. (Richard?)

So, I still tend to suspect a problem in the display color profile or in the lcms color management engine (which is used by eog and GIMP). Maybe you can attach an affected image and the color profile?
Comment 4 Horea Christian 2014-06-30 23:34:18 UTC
Ok, I have looked into the RawTherapee settings, and apparently the error was with me not selecting my color profile correctly (there and in GIMP). Many thanks for the clarification on why color management should be handled at the application level and not just at the very end. I believe it is ok to just close the issue (perhaps pending Richars's answer?), but if you would be so kind I would have a few more questions (sadly nobody on stack exchange or in the RawTherapee forums could clarify them).

- so, saving pictures with sRGB or equivalent will limit the range in which they can display colors to s smaller gamut than that of my screen - rather than scaling the gamut?

- do you know anything about the elusive chromium CLI argument to get color management running (I was also unable to find anything on that)

- It appears you use RawTherapee yourself - except for sRGB I see no color profile with entries under "Working Profile" and "Output Profile" - what can I do to correctly preview pictures which I intend to output for a wider gamut than sRGB?

Other than that, why does Nautilus not regard the color profiles when displaying previews? If EOG can do this without additional settings (such as required by RT or GIMP), perhaps Nautilus should too?
Comment 5 André Klapper 2021-06-19 08:46:02 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/eog/-/issues/

Thank you for your understanding and your help.