diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-07-25 13:12:59 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-07-25 13:12:59 +0000 |
commit | f1cac331247fbf673e02bdb8a657e4cf56a88cb1 (patch) | |
tree | 2ddc449ff899a221b050703649755d6853cd1af6 | |
parent | 12ce1bf85d6577fc4cca23c99064763704f6a7a7 (diff) | |
download | mupdf-f1cac331247fbf673e02bdb8a657e4cf56a88cb1.tar.xz |
Premultiply colors with alpha when expanding indexed pixmaps.
-rw-r--r-- | mupdf/pdf_colorspace.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mupdf/pdf_colorspace.c b/mupdf/pdf_colorspace.c index d7b5d3bf..ad793264 100644 --- a/mupdf/pdf_colorspace.c +++ b/mupdf/pdf_colorspace.c @@ -222,10 +222,11 @@ pdf_expandindexedpixmap(fz_pixmap *src) for (x = 0; x < src->w; x++) { int v = *s++; + int a = *s++; v = MIN(v, high); for (k = 0; k < n; k++) - *d++ = lookup[v * n + k]; - *d++ = *s++; + *d++ = fz_mul255(lookup[v * n + k], a); + *d++ = a; } } |