summaryrefslogtreecommitdiff
path: root/draw
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-10-14 11:45:05 +0000
committerTor Andersson <tor@ghostscript.com>2010-10-14 11:45:05 +0000
commit8b3c94023de0c4140b698c50c2d0c4facedf71df (patch)
tree911dea8ad225cd3834c6eda304c2410bc45e6939 /draw
parent5c321b5fbd59dfee2ca9c6c09eefa9c7caa9f341 (diff)
downloadmupdf-8b3c94023de0c4140b698c50c2d0c4facedf71df.tar.xz
Fix error in smooth scaling that only occured with horizontally flipped colour images. Patch by Robin Watts.
Diffstat (limited to 'draw')
-rw-r--r--draw/imagesmooth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/draw/imagesmooth.c b/draw/imagesmooth.c
index 5eea3cdb..1bdbedf7 100644
--- a/draw/imagesmooth.c
+++ b/draw/imagesmooth.c
@@ -602,7 +602,7 @@ scale_row_to_temp2(int *dst, unsigned char *src, fz_weights *weights)
assert(weights->n == 2);
if (weights->flip)
{
- dst += weights->count;
+ dst += 2*weights->count;
for (i=weights->count; i > 0; i--)
{
int c1 = 0;
@@ -649,7 +649,7 @@ scale_row_to_temp4(int *dst, unsigned char *src, fz_weights *weights)
assert(weights->n == 4);
if (weights->flip)
{
- dst += weights->count;
+ dst += 4*weights->count;
#ifdef ARCH_ARM
asm volatile(
"1:"