diff options
author | Tor Andersson <tor@ghostscript.com> | 2010-10-20 23:59:06 +0000 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2010-10-20 23:59:06 +0000 |
commit | fc2330c7f38d829f770f35cf9b41d381647d1b38 (patch) | |
tree | ef5985fca5280c5ec30b8e04c836d21894a18149 /draw | |
parent | 6324164812f0952e9352fb24f8d8f1d103f52707 (diff) | |
download | mupdf-fc2330c7f38d829f770f35cf9b41d381647d1b38.tar.xz |
Pre-multiply colors when converting the rendered grayscale shading to color via its function lookup table.
Diffstat (limited to 'draw')
-rw-r--r-- | draw/meshdraw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/draw/meshdraw.c b/draw/meshdraw.c index 61b678ab..b5880ddf 100644 --- a/draw/meshdraw.c +++ b/draw/meshdraw.c @@ -374,9 +374,10 @@ fz_rendershade(fz_shade *shade, fz_matrix ctm, fz_pixmap *dest, fz_bbox bbox) while (len--) { int v = *s++; + int a = *s++; for (k = 0; k < conv->n - 1; k++) - *d++ = clut[v][k]; - *d++ = *s++; + *d++ = fz_mul255(clut[v][k], a); + *d++ = a; } fz_paintpixmap(dest, conv, 255); fz_droppixmap(conv); |