summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-07-02 03:22:32 +0200
committerTor Andersson <tor@ghostscript.com>2010-07-02 03:22:32 +0200
commit28dc66da1c19950c002849faf9bb7a6828dede11 (patch)
tree84b42f933ad05ee7a5e17a42d864baeec4bc7eca /fitz
parentf34c2ff2d42214413f1b85b1314c8dd8bb92aa41 (diff)
downloadmupdf-28dc66da1c19950c002849faf9bb7a6828dede11.tar.xz
Compute the scaled image width and height with the right factors (so we don't divide by zero).
Diffstat (limited to 'fitz')
-rw-r--r--fitz/dev_draw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/dev_draw.c b/fitz/dev_draw.c
index 2f1ec421..9dfa58fc 100644
--- a/fitz/dev_draw.c
+++ b/fitz/dev_draw.c
@@ -518,8 +518,8 @@ calcimagestate(fz_drawdevice *dev, fz_pixmap *image, fz_matrix ctm,
else
*dy = sy;
- w = image->w / *dx;
- h = image->h / *dy;
+ w = (image->w + *dx - 1) / *dx;
+ h = (image->h + *dy - 1) / *dy;
path = fz_newpath();
fz_moveto(path, 0, 0);