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 737440 - EOG - CMYK jpg colors are saturated and not correct
EOG - CMYK jpg colors are saturated and not correct
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-09-26 14:48 UTC by Raghavendra Kamath
Modified: 2021-06-19 08:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
attachment showing difference in color between EOG and other CMYK color aware application (282.75 KB, image/jpeg)
2014-09-26 14:48 UTC, Raghavendra Kamath
Details
CMYK jpg with 100% cyan fill (544.62 KB, image/jpeg)
2014-09-26 18:48 UTC, Raghavendra Kamath
Details
cyan.jpg converted into pdf for referrence (1.07 MB, application/pdf)
2014-09-26 19:13 UTC, Raghavendra Kamath
Details

Description Raghavendra Kamath 2014-09-26 14:48:28 UTC
Created attachment 287166 [details]
attachment showing difference in color between EOG and other CMYK color aware application

images (jpg, tiff) with CMYK colors are over saturated and incorrect when viewed from EOG (image viewer).

I have added a screenshot for reference. When viewed from CMYK aware application the colors are correctly displayed whereas when the same jpg is viewed in EOG the colors are incorrect.
Comment 1 Felix Riemann 2014-09-26 18:31:13 UTC
Hmm, I am not sure, but there could be a little problem with color management here. However as eog gets CMYK images decoded as RGB this might take a bit.

Can you attach your sample image for reference?
Comment 2 Raghavendra Kamath 2014-09-26 18:48:39 UTC
Created attachment 287201 [details]
CMYK jpg with 100% cyan fill
Comment 3 Raghavendra Kamath 2014-09-26 18:51:37 UTC
Yes sure, please find the attached image in comment #2. it is filled with 100% cyan, it is the same image which I have shown in the attachment.

If it helps I want to add one more detail, the thumbnail that the OS (ubuntu 14.04) creates is also wrong.

But this image is shown correctly in other software which support CMYK colorspace.
May be which displaying the CMYK image in rgb colorspace EOG is doing wrong conversion.
Comment 4 Raghavendra Kamath 2014-09-26 19:13:31 UTC
Created attachment 287204 [details]
cyan.jpg converted into pdf for referrence
Comment 5 Raghavendra Kamath 2014-09-26 19:15:29 UTC
I converted the same cyan.jpg to pdf with imagemagick and opened it in evince. Evince shows the colors correctly 

I am attaching the PDF in comment #4 for your reference so that you can quickly see what the original color looks like
Comment 6 Felix Riemann 2014-09-30 17:36:42 UTC
Okay, this is practically a matter of applying the included color profile.
Eog doesn't apply CMYK color profiles currently as eog already gets pre-converted RGB(A) data from the image decoders. From my understanding we would have to use the ICC profile to do the color conversion instead of the one built-into the image decoder, which is currently not possible.

There exists an option that makes color profiling library interpret the RGB data as inverted CMYK, which works with your sample picture. But I am currently not sure how "correct" and portable this is.
Comment 7 below 2015-01-25 21:37:22 UTC
From which image decoder are you getting the pre-converted RGB data?

I noticed that all Linux image viewers share this same bug and produce the same oversaturated output(except Imagemagick display, which has even weirder output). Only krita, scribus and cinepaint seem to be getting it right. So I had hoped that this was a problem in one library and could be fixed there once for all viewers. I concluded this had to be libjpeg.

But now the developers of libjpeg-turbo insist that their library, as well as the original libjpeg, does no conversion CMYK-RGB (discussed here: http://sourceforge.net/p/libjpeg-turbo/mailman/message/33266986/).

So which library is used to convert CMYK-RGB for eog? Is this a GTK thing?
Comment 8 Raghavendra Kamath 2015-01-26 13:35:15 UTC
I can confirm that all the viewers behave the same with cmyk images, so I guess you are right. I have tried almost all image viewers but haven't found one that shows the color correctly.

I have libjpeg8, libjpeg-turbo, libicc2, libcm1, and other color libraries installed. Mine is a ubuntu 14.20 and it has default libraries that came with it.

I haven't installed anything extra.

Unfortunately i am not a programmer but an artist so finding out which library is used is a bit difficult for, however i can do so with your guidance.

I use krita and it does excellent job in showing the correct cmyk colors. I am on their IRC channel I can ask them for more information too.
Comment 9 Felix Riemann 2015-01-26 18:17:52 UTC
(In reply to comment #7)
> From which image decoder are you getting the pre-converted RGB data?
> 
> I noticed that all Linux image viewers share this same bug and produce the same
> oversaturated output(except Imagemagick display, which has even weirder
> output). Only krita, scribus and cinepaint seem to be getting it right. So I
> had hoped that this was a problem in one library and could be fixed there once
> for all viewers. I concluded this had to be libjpeg.
> 
> But now the developers of libjpeg-turbo insist that their library, as well as
> the original libjpeg, does no conversion CMYK-RGB (discussed here:
> http://sourceforge.net/p/libjpeg-turbo/mailman/message/33266986/).
> 
> So which library is used to convert CMYK-RGB for eog? Is this a GTK thing?

eog uses gdk-pixbuf for image decoding, except for SVGs which are rendered using librsvg. gdk-pixbuf abstracts the image decoding away from eog and provides a loader mechanism which allowed adding more formats by including another 'plugin'. But, as it wasn't extended beyond supporting the RGB colorspace (with alpha channel), its JPEG loader automatically does a simple CMYK->RGB conversion. However, this prevents eog from doing a full color correction as the color profile expects CMYK pixel data as input.

eog does interface with libjpeg only for losslessly saving rotated JPEG images.
Switching to libjpeg for loading as well is currently not undertaken as it will likely require larger architectural changes.
Comment 10 André Klapper 2021-06-19 08:47:04 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.