From 2f01e06786c6f4b2479fdb728bd26062d07208e0 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 27 May 2013 09:21:41 +0200 Subject: [PATCH] fix #64898imagerotate is broken with bilinear interpolation --- ext/gd/libgd/gd_interpolation.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 6c5549eba6bf2..bcd76e97078ab 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];