From 28dc66da1c19950c002849faf9bb7a6828dede11 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 2 Jul 2010 03:22:32 +0200 Subject: Compute the scaled image width and height with the right factors (so we don't divide by zero). --- fitz/dev_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fitz') 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); -- cgit v1.2.3