summaryrefslogtreecommitdiff
path: root/splash/Splash.cc
diff options
context:
space:
mode:
authorThomas Freitag <Thomas.Freitag@alfa.de>2014-02-12 21:50:38 +0100
committerAlbert Astals Cid <aacid@kde.org>2014-02-12 21:50:38 +0100
commitd7d61dcda91910f7eb2548b19e8380d7c3232dd3 (patch)
tree66ce350ed1e642b474b60a8e935827bf81d4fd91 /splash/Splash.cc
parentb2905a0d299cc09fcd219afe49cb370f6db61c5a (diff)
blend usage in PDF with spot colors casue random output
The reason for the random colors is the uninitialized local variable cBlend. The blend functions only fills offset 0 to 3, so offset 4 up to 4 + SPOT_NCOMPS are left uninitialized, but all offsets are stored in the bitmap. So we need to initialize these offsets with 0! Bug #74883
Diffstat (limited to 'splash/Splash.cc')
-rw-r--r--splash/Splash.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/splash/Splash.cc b/splash/Splash.cc
index 4a7d814f..6d4dd263 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -13,7 +13,7 @@
//
// Copyright (C) 2005-2013 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2005 Marco Pesenti Gritti <mpg@redhat.com>
-// Copyright (C) 2010-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2010-2014 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2010 Christian Feuersänger <cfeuersaenger@googlemail.com>
// Copyright (C) 2011-2013 William Bader <williambader@hotmail.com>
// Copyright (C) 2012 Markus Trippelsdorf <markus@trippelsdorf.de>
@@ -584,6 +584,13 @@ void Splash::pipeRun(SplashPipe *pipe) {
//----- blend function
if (state->blendFunc) {
+#ifdef SPLASH_CMYK
+ if (bitmap->mode == splashModeDeviceN8) {
+ for (int k = 4; k < 4 + SPOT_NCOMPS; k++) {
+ cBlend[k] = 0;
+ }
+ }
+#endif
(*state->blendFunc)(cSrc, cDest, cBlend, bitmap->mode);
}