summaryrefslogtreecommitdiff
path: root/source/tools/mudraw.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-11-07 17:32:15 +0000
committerRobin Watts <robin.watts@artifex.com>2017-11-08 12:57:18 +0000
commit3119f69dd9536cdaab0719fba2898be894e8fc01 (patch)
tree7e034de6e3d83ca163ce656b328e29c1b55a03e4 /source/tools/mudraw.c
parent520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 (diff)
downloadmupdf-3119f69dd9536cdaab0719fba2898be894e8fc01.tar.xz
Pixmap writers for formats with alpha should handle premultiplied data.
Any pixmap writers that can handle data with an alpha plane should accept that data in premultiplied form, and write it out appropriately for the file format. This avoids the need to unpremultiply data in mudraw, and solves the issue we were seeing where we want the png writer to be able to cope with premultiplied data (such as for the debug blending routines) and unpremultiplied data (such as that given after mudraw has unpremultiplied the data).
Diffstat (limited to 'source/tools/mudraw.c')
-rw-r--r--source/tools/mudraw.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c
index e2322266..9477919e 100644
--- a/source/tools/mudraw.c
+++ b/source/tools/mudraw.c
@@ -490,9 +490,6 @@ static void drawband(fz_context *ctx, fz_page *page, fz_display_list *list, cons
if (gamma_value != 1)
fz_gamma_pixmap(ctx, pix, gamma_value);
- if (pix->alpha)
- fz_unmultiply_pixmap(ctx, pix);
-
if (((output_format == OUT_PCL || output_format == OUT_PWG) && out_cs == CS_MONO) || (output_format == OUT_PBM) || (output_format == OUT_PKM))
*bit = fz_new_bitmap_from_pixmap_band(ctx, pix, NULL, band_start);
}