summaryrefslogtreecommitdiff
path: root/fitz/dev_draw.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2011-02-08 08:37:25 +0000
committerTor Andersson <tor@ghostscript.com>2011-02-08 08:37:25 +0000
commit1b8a2963bd93117e72d2a5159e739a77e455c37f (patch)
tree8aa94c005529ad52c92d07cbefdc7fe3be76de51 /fitz/dev_draw.c
parent385b171b8bef464bbf652c81d85728ccb064ab86 (diff)
downloadmupdf-1b8a2963bd93117e72d2a5159e739a77e455c37f.tar.xz
Only interpolate upscaled images when the interpolate flag is set in the image dictionary.
Diffstat (limited to 'fitz/dev_draw.c')
-rw-r--r--fitz/dev_draw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fitz/dev_draw.c b/fitz/dev_draw.c
index 439c4115..4d3c94f2 100644
--- a/fitz/dev_draw.c
+++ b/fitz/dev_draw.c
@@ -601,7 +601,7 @@ fz_drawfillimage(void *user, fz_pixmap *image, fz_matrix ctm, float alpha)
#ifdef SMOOTHSCALE
dx = sqrtf(ctm.a * ctm.a + ctm.b * ctm.b);
dy = sqrtf(ctm.c * ctm.c + ctm.d * ctm.d);
- if (dx < image->w && dy < image->h)
+ if (dx < image->w || dy < image->h)
{
scaled = fz_smoothtransformpixmap(image, &ctm, dev->dest->x, dev->dest->y, dx, dy);
if (scaled == nil)
@@ -649,7 +649,7 @@ fz_drawfillimagemask(void *user, fz_pixmap *image, fz_matrix ctm,
#ifdef SMOOTHSCALE
dx = sqrtf(ctm.a * ctm.a + ctm.b * ctm.b);
dy = sqrtf(ctm.c * ctm.c + ctm.d * ctm.d);
- if (dx < image->w && dy < image->h)
+ if (dx < image->w || dy < image->h)
{
scaled = fz_smoothtransformpixmap(image, &ctm, dev->dest->x, dev->dest->y, dx, dy);
if (scaled == nil)
@@ -720,7 +720,7 @@ fz_drawclipimagemask(void *user, fz_pixmap *image, fz_matrix ctm)
#ifdef SMOOTHSCALE
dx = sqrtf(ctm.a * ctm.a + ctm.b * ctm.b);
dy = sqrtf(ctm.c * ctm.c + ctm.d * ctm.d);
- if (dx < image->w && dy < image->h)
+ if (dx < image->w || dy < image->h)
{
scaled = fz_smoothtransformpixmap(image, &ctm, dev->dest->x, dev->dest->y, dx, dy);
if (scaled == nil)