[poppler] splash/Splash.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Wed Feb 12 12:51:30 PST 2014


 splash/Splash.cc |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit d7d61dcda91910f7eb2548b19e8380d7c3232dd3
Author: Thomas Freitag <Thomas.Freitag at alfa.de>
Date:   Wed Feb 12 21:50:38 2014 +0100

    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

diff --git a/splash/Splash.cc b/splash/Splash.cc
index 4a7d814..6d4dd26 100644
--- a/splash/Splash.cc
+++ b/splash/Splash.cc
@@ -13,7 +13,7 @@
 //
 // Copyright (C) 2005-2013 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2005 Marco Pesenti Gritti <mpg at redhat.com>
-// Copyright (C) 2010-2013 Thomas Freitag <Thomas.Freitag at alfa.de>
+// Copyright (C) 2010-2014 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2010 Christian Feuersänger <cfeuersaenger at googlemail.com>
 // Copyright (C) 2011-2013 William Bader <williambader at hotmail.com>
 // Copyright (C) 2012 Markus Trippelsdorf <markus at 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);
     }
 


More information about the poppler mailing list