[poppler] poppler/GfxState.cc poppler/GfxState.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 24 09:41:05 UTC 2020


 poppler/GfxState.cc |    2 +-
 poppler/GfxState.h  |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 0cd75023d84baf9d996c0f55da5ea9bd4c2d3b33
Author: Thomas Freitag <thomas.freitag.bbr at gmail.com>
Date:   Thu Dec 24 09:41:03 2020 +0000

    don't use colorspace2 optimization if caller wants the spot colorants

diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 76599810..2ad99a24 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -5906,7 +5906,7 @@ void GfxImageColorMap::getDeviceN(const unsigned char *x, GfxColor *deviceN)
     GfxColor color;
     int i;
 
-    if (colorSpace2) {
+    if ((colorSpace->getMapping() == nullptr || colorSpace->getMapping()[0] == -1) && colorSpace2) {
         for (i = 0; i < nComps2; ++i) {
             color.c[i] = lookup2[i][x[0]];
         }
diff --git a/poppler/GfxState.h b/poppler/GfxState.h
index f8e85bf5..fec281bf 100644
--- a/poppler/GfxState.h
+++ b/poppler/GfxState.h
@@ -270,6 +270,7 @@ public:
 
     // create mapping for spot colorants
     virtual void createMapping(std::vector<GfxSeparationColorSpace *> *separationList, int maxSepComps);
+    int *getMapping() const { return mapping; }
 
     // Does this ColorSpace support getRGBLine?
     virtual bool useGetRGBLine() const { return false; }


More information about the poppler mailing list