summaryrefslogtreecommitdiff
path: root/draw
diff options
context:
space:
mode:
Diffstat (limited to 'draw')
-rw-r--r--draw/draw_scale.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/draw/draw_scale.c b/draw/draw_scale.c
index 40a5deff..6bf741ca 100644
--- a/draw/draw_scale.c
+++ b/draw/draw_scale.c
@@ -16,6 +16,12 @@ and then positioning it at (frac(x),frac(y)).
*/
#define SINGLE_PIXEL_SPECIALS
+/* It's important that we count contributions carefully as they approach the
+ * edges, otherwise we end up with weights in the outside pixels of
+ * grid-fitted images that don't sum to 256, and hence get lines across the
+ * page. See bug #691629. */
+#define WRAP
+
#ifdef DEBUG_SCALING
#ifdef WIN32
#include <windows.h>
@@ -357,6 +363,8 @@ add_weight(fz_weights *weights, int j, int i, fz_scale_filter *filter,
i = src_w-1;
weight = 0;
}
+ if (weight == 0)
+ return;
#endif
DBUG(("add_weight[%d][%d] = %d(%g) dist=%g\n",j,i,weight,f,dist));