[poppler] [PATCH] Correctly manipulate spot colors if SPOT_NCOMPS != 4
Stefan BrĂ¼ns
stefan.bruens at rwth-aachen.de
Sat May 26 00:47:13 UTC 2018
The default number of spot colors is 4, in this case the change is
without effect, otherwise only the last 4 colors where handled.
---
splash/SplashTypes.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/splash/SplashTypes.h b/splash/SplashTypes.h
index ca0e3bc0..2f65b5ba 100644
--- a/splash/SplashTypes.h
+++ b/splash/SplashTypes.h
@@ -126,7 +126,7 @@ static inline void splashClearColor(SplashColorPtr dest) {
dest[2] = 0;
#ifdef SPLASH_CMYK
dest[3] = 0;
- for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++)
+ for (int i = 4; i < SPOT_NCOMPS + 4; i++)
dest[i] = 0;
#endif
}
@@ -137,7 +137,7 @@ static inline void splashColorCopy(SplashColorPtr dest, SplashColorPtr src) {
dest[2] = src[2];
#ifdef SPLASH_CMYK
dest[3] = src[3];
- for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++)
+ for (int i = 4; i < SPOT_NCOMPS + 4; i++)
dest[i] = src[i];
#endif
}
@@ -148,7 +148,7 @@ static inline void splashColorXor(SplashColorPtr dest, SplashColorPtr src) {
dest[2] ^= src[2];
#ifdef SPLASH_CMYK
dest[3] ^= src[3];
- for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++)
+ for (int i = 4; i < SPOT_NCOMPS + 4; i++)
dest[i] ^= src[i];
#endif
}
--
2.16.3
More information about the poppler
mailing list