<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [patch] Allow configuring SPLASH_CMYK support with --enable-cmyk as in xpdf"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90795#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [patch] Allow configuring SPLASH_CMYK support with --enable-cmyk as in xpdf"
href="https://bugs.freedesktop.org/show_bug.cgi?id=90795">bug 90795</a>
from <span class="vcard"><a class="email" href="mailto:williambader@hotmail.com" title="William Bader <williambader@hotmail.com>"> <span class="fn">William Bader</span></a>
</span></b>
<pre>Here are more places that use SPLASH_CMYK:
poppler/PSOutputDev.cc
if (level == psLevel1Sep || level == psLevel2Sep ||
level == psLevel3Sep || globalParams->getOverprintPreview())
it sets up numComps = 4 and new SplashOutputDev(splashModeCMYK8)
When SPLASH_CMYK is not set, it sets up numComps = 3 and splashModeRGB8
instead which breaks pdftops.cc
splash/SplashBitmap.cc SplashBitmap::getRGBLine() and
SplashBitmap::getXBGRLine() add a check for separationList->getLength() > 0
poppler/SplashOutputDev.cc convertGfxColor() adds an initialization for
color[3] = 0.
poppler/SplashOutputDev.cc SplashOutputDev::drawMaskedImage() and
SplashOutputDev::drawSoftMaskedImage() and
SplashOutputDev::univariateShadedFill() call
colorMap->getColorSpace()->createMapping(bitmap->getSeparationList(),
SPOT_NCOMPS);
poppler/SplashOutputDev.cc SplashOutputDev::beginTransparencyGroup() has
} else if (blendingColorSpace->getMode() == csDeviceCMYK ||
(blendingColorSpace->getMode() == csICCBased &&
blendingColorSpace->getNComps() == 4)) {
colorMode = splashModeCMYK8;
This might be another way that poppler can work incorrectly if SPLASH_CMYK is
disabled.
splash/SplashState.cc SplashState::SplashState() (several different versions)
initializes
for (i = 0; i < 256; ++i) {
cmykTransferC[i] = (Guchar)i;
cmykTransferM[i] = (Guchar)i;
cmykTransferY[i] = (Guchar)i;
cmykTransferK[i] = (Guchar)i;
for (int cp = 0; cp < SPOT_NCOMPS+4; cp++)
deviceNTransfer[cp][i] = (Guchar)i;
This might be an example of a place that adds a very small performance
penalty when SPLASH_CMYK is enabled.
splash/SplashState.cc SplashState::setTransfer() does more copying when
SPLASH_STATE is enabled, similar to SplashState()
splash/SplashState.h is several times larger
Guchar cmykTransferC[256],
cmykTransferM[256],
cmykTransferY[256],
cmykTransferK[256];
Guchar deviceNTransfer[SPOT_NCOMPS+4][256];
splash/SplashTypes.h splashClearColor(), splashColorCopy() and splashColorXor()
copy more fields
dest[3] = src[3];
for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++)
dest[i] = src[i];</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>