summaryrefslogtreecommitdiff
path: root/source/tools
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-05-26 15:13:18 +0100
committerRobin Watts <robin.watts@artifex.com>2016-05-26 15:14:14 +0100
commit4862df326a2ad2ad87da13b58d597f234e7f0922 (patch)
tree9365837effe6e7830a15aca82e6d1090fbe8bc5f /source/tools
parent0a764b9821256b8fe71e6693cbd9b093657878b8 (diff)
downloadmupdf-4862df326a2ad2ad87da13b58d597f234e7f0922.tar.xz
Bug 696803: Fix pam output.
PAM output was broken in the absence of alpha. Fixed now.
Diffstat (limited to 'source/tools')
-rw-r--r--source/tools/mudraw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c
index b1ab97e9..4b3a6df2 100644
--- a/source/tools/mudraw.c
+++ b/source/tools/mudraw.c
@@ -854,9 +854,9 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in
if (output)
{
if (output_format == OUT_PGM || output_format == OUT_PPM || output_format == OUT_PNM)
- fz_write_pnm_header(ctx, out, pix->w, totalheight, pix->n);
+ fz_write_pnm_header(ctx, out, pix->w, totalheight, pix->n, pix->alpha);
else if (output_format == OUT_PAM)
- fz_write_pam_header(ctx, out, pix->w, totalheight, pix->n, savealpha);
+ fz_write_pam_header(ctx, out, pix->w, totalheight, pix->n, pix->alpha, savealpha);
else if (output_format == OUT_PNG)
poc = fz_write_png_header(ctx, out, pix->w, totalheight, pix->n, pix->alpha, savealpha);
else if (output_format == OUT_PBM)
@@ -890,9 +890,9 @@ static void dodrawpage(fz_context *ctx, fz_page *page, fz_display_list *list, in
if (output)
{
if (output_format == OUT_PGM || output_format == OUT_PPM || output_format == OUT_PNM)
- fz_write_pnm_band(ctx, out, pix->w, totalheight, pix->n, pix->stride, band, drawheight, pix->samples);
+ fz_write_pnm_band(ctx, out, pix->w, totalheight, pix->n, pix->alpha, pix->stride, band, drawheight, pix->samples);
else if (output_format == OUT_PAM)
- fz_write_pam_band(ctx, out, pix->w, totalheight, pix->n, pix->stride, band, drawheight, pix->samples, savealpha);
+ fz_write_pam_band(ctx, out, pix->w, totalheight, pix->n, pix->alpha, pix->stride, band, drawheight, pix->samples, savealpha);
else if (output_format == OUT_PNG)
fz_write_png_band(ctx, out, poc, pix->stride, band, drawheight, pix->samples);
else if (output_format == OUT_PWG)