summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-05-23 17:45:21 +0100
committerRobin Watts <robin.watts@artifex.com>2016-05-24 12:48:35 +0100
commitd0b78f4166a1503ce522944002b3aab035724cd9 (patch)
treeb8c680dc401db56a28be1110759219c7c175dd8d /platform/x11
parent841952db71d6541a2e98fd4d1d49dede284b2cf8 (diff)
downloadmupdf-d0b78f4166a1503ce522944002b3aab035724cd9.tar.xz
fz_pixmap revamp: add stride and make alpha optional
fz_pixmaps now have an explicit stride value. By default no change from before, but code all copes with extra gaps at the end of the line. The alpha data in fz_pixmaps is no longer compulsory. mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw). Update halftone code to not expect alpha plane. Update PNG writing to cope with alpha less input. Also hide repeated params within the png output context. ARM code needs updating.
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/pdfapp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c
index ab5b2e8d..fd1f6a1a 100644
--- a/platform/x11/pdfapp.c
+++ b/platform/x11/pdfapp.c
@@ -891,7 +891,7 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai
else
colorspace = app->colorspace;
app->image = NULL;
- app->image = fz_new_pixmap_with_bbox(app->ctx, colorspace, &ibounds);
+ app->image = fz_new_pixmap_with_bbox(app->ctx, colorspace, &ibounds, 1);
fz_clear_pixmap_with_value(app->ctx, app->image, 255);
if (app->page_list || app->annotations_list)
{
@@ -914,7 +914,7 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai
colorspace = fz_device_gray(app->ctx);
else
colorspace = app->colorspace;
- app->image = fz_new_pixmap_with_bbox(app->ctx, colorspace, &ibounds);
+ app->image = fz_new_pixmap_with_bbox(app->ctx, colorspace, &ibounds, app->image->alpha);
app->duration = 0;
new_trans = fz_page_presentation(app->ctx, app->page, &app->duration);
if (new_trans)