From: Pierre Joye Date: Mon, 27 May 2013 07:21:41 +0000 (+0200) Subject: fix #64898imagerotate is broken with bilinear interpolation X-Git-Tag: php-5.5.0RC3~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f01e06786c6f4b2479fdb728bd26062d07208e0;p=php fix #64898imagerotate is broken with bilinear interpolation --- diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 6c5549eba6..bcd76e9707 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -1830,18 +1830,18 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int const gdFixed f_w4 = gd_mulfx(f_f, f_g); if (n < src_w - 1) { - src_offset_x = m + 1; - src_offset_y = n; + src_offset_x = n + 1; + src_offset_y = m; } if (m < src_h-1) { - src_offset_x = m; - src_offset_y = n + 1; + src_offset_x = n; + src_offset_y = m + 1; } if (!((n >= src_w-1) || (m >= src_h-1))) { - src_offset_x = m + 1; - src_offset_y = n + 1; + src_offset_x = n + 1; + src_offset_y = m + 1; } { const int pixel1 = src->tpixels[src_offset_y][src_offset_x];