diff options
| author | Pierre Joye <pierre.php@gmail.com> | 2013-05-27 09:21:41 +0200 |
|---|---|---|
| committer | Pierre Joye <pierre.php@gmail.com> | 2013-05-27 09:21:41 +0200 |
| commit | 2f01e06786c6f4b2479fdb728bd26062d07208e0 (patch) | |
| tree | 600eeac89b00b0889c38e6da06de8d2fcdfbc37d /ext/gd | |
| parent | b262787ef9861a3a61f46ba4031f5aa6659eb7fb (diff) | |
| download | php-git-2f01e06786c6f4b2479fdb728bd26062d07208e0.tar.gz | |
fix #64898imagerotate is broken with bilinear interpolation
Diffstat (limited to 'ext/gd')
| -rw-r--r-- | ext/gd/libgd/gd_interpolation.c | 12 |
1 files changed, 6 insertions, 6 deletions
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]; |
