Bug 690626 - use lcms for color management, and use a better default cmyk conversion
Summary: use lcms for color management, and use a better default cmyk conversion
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: fitz (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P4 enhancement
Assignee: Michael Vrhel
URL:
Keywords:
: 691632 692063 694445 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-13 04:15 UTC by zeniko
Modified: 2017-08-08 03:22 UTC (History)
8 users (show)

See Also:
Customer:
Word Size: ---


Attachments
minimal testcase (412 bytes, application/pdf)
2009-12-03 16:43 UTC, zeniko
Details

Note You need to log in before you can comment on or make changes to this bug.
Comment 1 zeniko 2009-12-03 16:43:33 UTC
Created attachment 5740 [details]
minimal testcase

Adobe Reader doesn't render "/DefaultCMYK cs 1 0 0 0 scn" the same as
"/DefaultRGB cs 0 1 1 scn". The latter appears as expected while the former
seems to be transformed (gamma corrected?) during the CMYK-to-RGB conversion.

This is at least the issue from
http://code.google.com/p/sumatrapdf/issues/detail?id=756 and quite likely from
some of the other reports as well.
Comment 2 Tor Andersson 2009-12-03 17:51:54 UTC
Our default color conversion from CMYK to RGB is the very simple and fast but very inaccurate algoritm 
from the PDF spec. We also ignore ICC colorspaces. The plan is to use lcms for color management.
Comment 3 Ray Johnston 2009-12-03 22:15:05 UTC
Note that there is no "standard" CMYK colorspace.

Adobe Acrobat Reader uses (AFAIK) US SWOP Web Coated conversion when colors
are CMYK.

What is "correct" is a matter of opinion unless one specifies the CMYK to
device independent (CIE XYZ) color conversion using a PostScript ColorSpace
array (as Ghostscript currently uses) or an ICC profile.

While this is reported against MuPDF, Ghostscript allows for the "DefaultCMYK"
colorspace to be specified and allows for an (almost identical) match to Adobe
Acrobat Reader.

This is actually a request to enhance MuPDF to add color conversion capability
similar to Ghostscript. Note that any enhancement should take into account all
of the design that is part of the Ghostscript ICC based color management since
there are MANY issues beyond CMYK colors affecting correct colors and the
transparency blending.
Comment 4 Tor Andersson 2010-09-27 11:59:24 UTC
*** Bug 691632 has been marked as a duplicate of this bug. ***
Comment 5 Tor Andersson 2011-04-10 14:09:30 UTC
*** Bug 692063 has been marked as a duplicate of this bug. ***
Comment 6 Tor Andersson 2013-07-29 12:07:28 UTC
*** Bug 694445 has been marked as a duplicate of this bug. ***
Comment 7 Michael Toftdal 2017-01-24 05:49:47 UTC
What is the status of this bug?
If I want to "upvote" this problem with my customer id (200), should I then create a new duplicate of this bug and set the Customer field on that, or can I edit the current bug?
Comment 8 Robin Watts 2017-01-24 07:00:16 UTC
(In reply to Michael Toftdal from comment #7)
> What is the status of this bug?

We have already improved the CMYK conversion that is used.

We do not yet have a color managed workflow, though this is on our roadmap. I cannot give you a completion date for this though.

> If I want to "upvote" this problem with my customer id (200), should I then
> create a new duplicate of this bug and set the Customer field on that, or
> can I edit the current bug?

It would probably be worth opening a new bug, and attaching example files etc to that. Often what appears to be the same problem on the surface can have different underlying causes, and it would be bad for us to spend time solving what we think is your problem only to discover that it was something else.
Comment 9 Sebastian Rasmussen 2017-08-08 03:11:42 UTC
LCMS2 color management was introduced in dd58ea5e2ff7e6b61cc5a5b6fd950fb62e92b8be I have checked the output of the attached file as well as the documents mentioned in sumatrapdf bugs 411, 560, 567, 662, 820 and 875 which are directly or indirectly referenced in this bug report.

The rendering now looks similar to that of Acrobat Reader.
Comment 10 Sebastian Rasmussen 2017-08-08 03:22:40 UTC
So I missed to copy the initial character of the commit id, the proper is dd58ea5e2ff7e6b61cc5a5b6fd950fb62e92b8be.