summaryrefslogtreecommitdiff
path: root/xps
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-01-20 17:39:25 +0100
committerTor Andersson <tor.andersson@artifex.com>2012-01-20 18:05:59 +0100
commitf08f46797df8d6cca982c08ed16eb1934b1dc7d9 (patch)
treeb47ad08d45680ecc5a481a41b341ac7b86f7b8c5 /xps
parent00ab7bd42463a4547dd563dd16cc99236c980459 (diff)
downloadmupdf-f08f46797df8d6cca982c08ed16eb1934b1dc7d9.tar.xz
Flip images the right side up in the PDF interpreter.
This way both pixmaps for rendering and image data are top-down.
Diffstat (limited to 'xps')
-rw-r--r--xps/xps_image.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/xps/xps_image.c b/xps/xps_image.c
index 85a467af..6ba514b7 100644
--- a/xps/xps_image.c
+++ b/xps/xps_image.c
@@ -29,15 +29,12 @@ xps_paint_image_brush(xps_document *doc, fz_matrix ctm, fz_rect area, char *base
{
fz_pixmap *pixmap = vimage;
float xs, ys;
- fz_matrix im;
if (pixmap->xres == 0 || pixmap->yres == 0)
return;
xs = pixmap->w * 96 / pixmap->xres;
ys = pixmap->h * 96 / pixmap->yres;
- im = fz_scale(xs, -ys);
- im.f = ys;
- ctm = fz_concat(im, ctm);
+ ctm = fz_concat(fz_scale(xs, ys), ctm);
fz_fill_image(doc->dev, pixmap, ctm, doc->opacity[doc->opacity_top]);
}