poppler/SplashOutputDev.cc | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-)
New commits: commit fc78330072b9771fa39d21896703adb4836e5398 Author: Albert Astals Cid <[email protected]> Date: Tue Aug 20 00:37:56 2013 +0200 use getRGBLine images if available Speeds up greatly files from bug #66928 E.g. some file went from 21s to 2s in my computer diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc index 4d4e945..d9ea990 100644 --- a/poppler/SplashOutputDev.cc +++ b/poppler/SplashOutputDev.cc @@ -2862,20 +2862,28 @@ GBool SplashOutputDev::imageSrc(void *data, SplashColorPtr colorLine, break; case splashModeRGB8: case splashModeBGR8: - for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { - imgData->colorMap->getRGB(p, &rgb); - *q++ = colToByte(rgb.r); - *q++ = colToByte(rgb.g); - *q++ = colToByte(rgb.b); + if (imgData->colorMap->useRGBLine()) { + imgData->colorMap->getRGBLine(p, (Guchar *) colorLine, imgData->width); + } else { + for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { + imgData->colorMap->getRGB(p, &rgb); + *q++ = colToByte(rgb.r); + *q++ = colToByte(rgb.g); + *q++ = colToByte(rgb.b); + } } break; case splashModeXBGR8: - for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { - imgData->colorMap->getRGB(p, &rgb); - *q++ = colToByte(rgb.r); - *q++ = colToByte(rgb.g); - *q++ = colToByte(rgb.b); - *q++ = 255; + if (imgData->colorMap->useRGBLine()) { + imgData->colorMap->getRGBXLine(p, (Guchar *) colorLine, imgData->width); + } else { + for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { + imgData->colorMap->getRGB(p, &rgb); + *q++ = colToByte(rgb.r); + *q++ = colToByte(rgb.g); + *q++ = colToByte(rgb.b); + *q++ = 255; + } } break; #if SPLASH_CMYK _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
