[Poppler-bugs] [Bug 14526] New: Poppler incorrectly renders CMYK colors
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Feb 16 15:53:01 PST 2008
http://bugs.freedesktop.org/show_bug.cgi?id=14526
Summary: Poppler incorrectly renders CMYK colors
Product: poppler
Version: unspecified
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: general
AssignedTo: poppler-bugs at lists.freedesktop.org
ReportedBy: thenders at gmail.com
Created an attachment (id=14361)
--> (http://bugs.freedesktop.org/attachment.cgi?id=14361)
Example of incorrect rendering
It seems that poppler is incorrectly rendering CMYK colors. Specifically, the
attachment is a picture of a cyan (1,0,0,0) filled color which should convert
to RGB (0,1,1) but is being converted incorrectly to (0,0.67,0.93).
The file GfxState.cc seems to be the culprit. I changed this file by editing
the function to contain (sorry but I don't know how to write patches)
void GfxDeviceCMYKColorSpace::getRGB(GfxColor *color, GfxRGB *rgb) {
double c, m, y, k, k1, r, g, b;
c = colToDbl(color->c[0]);
m = colToDbl(color->c[1]);
y = colToDbl(color->c[2]);
k = colToDbl(color->c[3]);
k1 = 1 - k;
r = (1-c)*k1;
g = (1-m)*k1;
b = (1-y)*k1;
rgb->r = clip01(dblToCol(r));
rgb->g = clip01(dblToCol(g));
rgb->b = clip01(dblToCol(b));
}
After changing this function to this, everything seems to work as normal.
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Poppler-bugs
mailing list