[poppler] Poppler too slow when compiled with cms

Koji Otani sho at bbr.jp
Mon Jan 19 00:18:48 PST 2009


Hi
I'm Koji Otani.

From: Carlos Garcia Campos <carlosgc at gnome.org>
Subject: Re: [poppler] Poppler too slow when compiled with cms
Date: Sun, 18 Jan 2009 18:54:51 +0100
Message-ID: <1232301291.4868.10.camel at charmaleon>

carlosgc> El dom, 18-01-2009 a las 18:40 +0100, Carlos Garcia Campos escribió:
carlosgc> > when compiled with cms support enabled poppler is too slow when
carlosgc> > rendering some pages. For example, rendering page 831 of PDF
carlosgc> > Specification 1.7 takes more than 1 minute in my system. 
carlosgc> > 
carlosgc> > Koji, any idea why does it happen?
carlosgc> 
carlosgc> btw, the output doesn't look right either. See this screenshot:
carlosgc> 
carlosgc> http://people.freedesktop.org/~carlosgc/poppler-with-cms.png
carlosgc> 

Sorry, this is a bug when using cairo and CMYK Profile.
I attach a patch to fix this.

--------------
Koji Otani
-------------- next part --------------
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 29d15e5..8274b5f 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -1573,7 +1574,7 @@ void GfxICCBasedColorSpace::getRGBLine(Guchar *in, unsigned int *out,
 	Guchar tmp[gfxColorMaxComps];
 
 	lineTransform->doTransform(in,tmp,1);
-	in += 3;
+	in += nComps;
 	out[i] = (tmp[0] << 16) | (tmp[1] << 8) | tmp[2];
     }
   } else {


More information about the poppler mailing list