summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-07-20 15:01:40 +0100
committerRobin Watts <robin.watts@artifex.com>2017-07-20 15:05:55 +0100
commitb6324cb00637fa646af76be7b5de3cd9e764b84c (patch)
treee974fe4c436f3959673ca310609ffa17b61fe137
parentf91b1b31682df7f9a8865521ef1c16e466abc05c (diff)
downloadmupdf-b6324cb00637fa646af76be7b5de3cd9e764b84c.tar.xz
Fix fz_clear_pixmap to allow for spots (and CMYK).
-rw-r--r--source/fitz/pixmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c
index 2ac8bae5..30ec27d5 100644
--- a/source/fitz/pixmap.c
+++ b/source/fitz/pixmap.c
@@ -431,7 +431,7 @@ fz_clear_pixmap(fz_context *ctx, fz_pixmap *pix)
stride *= h;
h = 1;
}
- if (pix->alpha)
+ if (pix->alpha || fz_colorspace_is_subtractive(ctx, pix->colorspace))
{
while (h--)
{
@@ -441,7 +441,6 @@ fz_clear_pixmap(fz_context *ctx, fz_pixmap *pix)
}
else
{
- /* FIXME: Not right for CMYK or other subtractive spaces */
while (h--)
{
memset(s, 0xff, (unsigned int)stride);