poppler/SplashOutputDev.cc |    2 +-
 poppler/Stream.cc          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 29cfa16d1f782fa9b5f7f48552183baf4991362a
Author: Thomas Freitag <[email protected]>
Date:   Sun Mar 29 12:48:51 2020 +0200

    Handle 1 bit RGB images in ICC colorspace

diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 047b2d2d..84365cc7 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -2847,7 +2847,7 @@ struct SplashOutImageData {
 bool SplashOutputDev::useIccImageSrc(void *data) {
   SplashOutImageData *imgData = (SplashOutImageData *)data;
 
-  if (!imgData->lookup && imgData->colorMap->getColorSpace()->getMode() == 
csICCBased) {
+  if (!imgData->lookup && imgData->colorMap->getColorSpace()->getMode() == 
csICCBased && imgData->colorMap->getBits() != 1) {
     GfxICCBasedColorSpace *colorSpace = (GfxICCBasedColorSpace *) 
imgData->colorMap->getColorSpace();
     switch (imgData->colorMode) {
     case splashModeMono1:
diff --git a/poppler/Stream.cc b/poppler/Stream.cc
index 7dd69c2f..c8c09084 100644
--- a/poppler/Stream.cc
+++ b/poppler/Stream.cc
@@ -813,7 +813,7 @@ bool StreamPredictor::getNextLine() {
 
   // apply TIFF (component) predictor
   if (predictor == 2) {
-    if (nBits == 1) {
+    if (nBits == 1 && nComps == 1) {
       inBuf = predLine[pixBytes - 1];
       for (i = pixBytes; i < rowBytes; i += 8) {
        // 1-bit add is just xor
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to