Commit d7d61dcd authored by Thomas Freitag's avatar Thomas Freitag Committed by Albert Astals Cid

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
parent b2905a0d
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment