Bug 412604

Summary: [CMYK] CGATS21_CRPC1.icc has a different rendering between softproofed and converted
Product: [Applications] krita Reporter: David REVOY <info>
Component: Color modelsAssignee: wolthera <griffinvalley>
Status: RESOLVED UPSTREAM    
Severity: normal CC: griffinvalley, halla
Priority: NOR    
Version: 4.2.7   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: ^ screenshot of the bug
Image showing the differences for Coated FOGRA 260

Description David REVOY 2019-10-04 15:02:40 UTC
Created attachment 123013 [details]
^ screenshot of the bug

Hi,
I'm starting a collab with a print factory using CGATS21_CRPC1.icc CMK color profile. Krita "Image → Convert image color space" looks great with it but if I use the same profile and try to softproof my sRGB art, it looks really different (bleached, white).

TO REPRODUCE:
=============
1. Download the ICC profile: https://onebookshelfpublisherservice.zendesk.com/hc/en-us/article_attachments/360036082354/CGATS21_CRPC1.icc
2. Open the same sRGB artwork or photo twice in Krita.
3. On the first; go to "Image → Convert image color space" and convert it to CGATS21_CRPC1.icc 8bit CMYK perceptual.
4. On the second; go to settings → configure Krita → Color management → Softproofing" and set CGATS21_CRPC1.icc 8bit CMYK perceptual. Press Ok, then activate softproofing (Ctrl+Y or View → Soft Proofing in the menu).

RESULT:
=======
The color looks really different between the two documents.

EXPECTED: 
=========
Getting the same rendering on both, to continue my artworks in RGB and correct them to be compliant with the printer's profile thanks to Soft Proofing.

NOTES & WORKAROUND
==================
Krita is not alone to render this way with this type of gamma issue: Scribus and GIMP also softproof it exactly the same way. To workaround this issue with this profile; Soft Proof the document with http://www.color.org/registry/CGATS21_CRPC6.xalter (download button down this page); it has less gamma issue and matches more or less the color restriction of CGATS21_CRPC1 for Soft Proofing (if I compare to the converted version).
Comment 1 wolthera 2019-10-05 13:00:09 UTC
Yes, this is correct, and I am not sure what is causing it.
Comment 2 Halla Rempt 2019-10-08 09:12:56 UTC
Could it be a bug in lcms's softproofing? That's what all three applications use.
Comment 3 Halla Rempt 2019-10-08 09:42:11 UTC
Asked on the lcms mailing list
Comment 4 David REVOY 2019-10-08 09:48:17 UTC
Thank you @Boud!
Comment 5 wolthera 2019-10-08 11:18:08 UTC
Created attachment 123087 [details]
Image showing the differences for Coated FOGRA 260

I am seeing this on other icc profiles as well, though much less strong. Attaching an image showing the difference between conversion and softproofing using the difference blending mode to give an indication of how high the differences are.
Comment 6 Halla Rempt 2019-10-12 15:51:21 UTC
Okay, this is the answer for Marti:

"Regarding the issue, I've checked the profile with photoshop and also got weird results, so chances are the a2b1 proof table is not correct in this profile.


Softproofing is performed in lcms by two steps. In first step the image is converted to the target colorspace using the settings the user wish, bpc rendering intent, etc. Once we have the image in the desired colorspace, we measure the lab values of the colors. To do so, we use relative colorimetric (i.e., no gamut remapping) in the reverse direction. This is encoded in the profile as the a2b1 table and is often called the "proofing" table. This is different from using the reverse table of perceptual a2b0, which "undoes" gamut mapping to display the image. So, tables may be diffeent on certain profiles. 
This could explain the differences you see.
"

That basically means the profile is borked...
Comment 7 David REVOY 2019-10-12 16:12:51 UTC
Ha, sad. The ICC color consortium propose only 23 official CMYK profiles: I thought I could at least trust their work and standard. I'm glad I found a workaround checking with another profile; I'll try to complain to upstream, I saw an email of the author/responsible of the icc:  http://www.color.org/registry/CGATS21_CRPC1.xalter  

Thanks again for the investigation @boud and @wolthera on this!
Comment 8 Halla Rempt 2019-10-12 17:03:47 UTC
Yes, please do complain upstream -- I want to know what the author of the profile says :-)