summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorPierre Joye <pierre.php@gmail.com>2013-05-27 09:21:41 +0200
committerPierre Joye <pierre.php@gmail.com>2013-05-27 09:21:41 +0200
commit2f01e06786c6f4b2479fdb728bd26062d07208e0 (patch)
tree600eeac89b00b0889c38e6da06de8d2fcdfbc37d /ext/gd
parentb262787ef9861a3a61f46ba4031f5aa6659eb7fb (diff)
downloadphp-git-2f01e06786c6f4b2479fdb728bd26062d07208e0.tar.gz
fix #64898imagerotate is broken with bilinear interpolation
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/libgd/gd_interpolation.c12
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];