Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P poppler
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 665
    • Issues 665
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 46
    • Merge requests 46
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poppler
  • poppler
  • Issues
  • #41
Closed
Open
Issue created Feb 16, 2008 by Bugzilla Migration User@bugzilla-migration

Poppler incorrectly renders CMYK colors

Submitted by Troy Henderson

Assigned to poppler-bugs

Link to original bug (#14526)

Description

Created attachment 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.

Attachment 14361, "Example of incorrect rendering":
preview.pdf

Depends on

  • Bug 17499
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking