From: Kalle Sommer Nielsen Date: Tue, 28 Jul 2009 20:35:06 +0000 (+0000) Subject: Fixed bug #42434 (ImageLine w/ antialias = 1px shorter) X-Git-Tag: php-5.4.0alpha1~191^2~2932 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb3a724441d43b8ac5a91330df62216827af5fda;p=php Fixed bug #42434 (ImageLine w/ antialias = 1px shorter) - patch by wojjie at gmail dot com --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 5d9a9d24c9..05def991b6 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1358,7 +1358,7 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col) x = x1 << 16; y = y1 << 16; inc = (dy * 65536) / dx; - while ((x >> 16) < x2) { + while ((x >> 16) <= x2) { gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (y >> 8) & 0xFF); if ((y >> 16) + 1 < im->sy) { gdImageSetAAPixelColor(im, x >> 16, (y >> 16) + 1,col, (~y >> 8) & 0xFF); @@ -1380,7 +1380,7 @@ void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col) x = x1 << 16; y = y1 << 16; inc = (dx * 65536) / dy; - while ((y>>16) < y2) { + while ((y>>16) <= y2) { gdImageSetAAPixelColor(im, x >> 16, y >> 16, col, (x >> 8) & 0xFF); if ((x >> 16) + 1 < im->sx) { gdImageSetAAPixelColor(im, (x >> 16) + 1, (y >> 16),col, (~x >> 8) & 0xFF);