diff options
author | Pierre Joye <pierre.php@gmail.com> | 2013-03-26 11:24:00 +0100 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2013-03-26 11:24:00 +0100 |
commit | 111123af4ff5bba76bc06066375a93c0babf84ac (patch) | |
tree | ba89381a16398ea9826fd7d90a9fc4c42f78efa4 /ext | |
parent | b6fa581d2de04b850129ad669b44865de4aef429 (diff) | |
parent | 5ae6f582fb9af6e93ecd7001646553ae98be6275 (diff) | |
download | php-git-111123af4ff5bba76bc06066375a93c0babf84ac.tar.gz |
conflict
Diffstat (limited to 'ext')
-rw-r--r-- | ext/gd/gd.c | 4 | ||||
-rw-r--r-- | ext/gd/libgd/gd.h | 1 | ||||
-rw-r--r-- | ext/gd/libgd/gd_interpolation.c | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index e1ac2b928c..c5a7fc883e 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2271,10 +2271,6 @@ PHP_FUNCTION(imagerotate) ZEND_FETCH_RESOURCE(im_src, gdImagePtr, &SIM, -1, "Image", le_gd); - if (color < 0) { - RETURN_FALSE; - } - im_dst = gdImageRotateInterpolated(im_src, (const float)degrees, color); if (im_dst != NULL) { diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h index 44c7c8a327..a5d128cf0a 100644 --- a/ext/gd/libgd/gd.h +++ b/ext/gd/libgd/gd.h @@ -690,6 +690,7 @@ gdImagePtr gdImageRotate180(gdImagePtr src, int ignoretransparent); gdImagePtr gdImageRotate270(gdImagePtr src, int ignoretransparent); gdImagePtr gdImageRotate45(gdImagePtr src, double dAngle, int clrBack, int ignoretransparent); gdImagePtr gdImageRotate (gdImagePtr src, double dAngle, int clrBack, int ignoretransparent); +gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor); void gdImageSetBrush(gdImagePtr im, gdImagePtr brush); void gdImageSetTile(gdImagePtr im, gdImagePtr tile); diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 3d0b8cae1f..4de95318c8 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -2180,6 +2180,10 @@ gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, const gdImagePtr gdImageRotateInterpolated(const gdImagePtr src, const float angle, int bgcolor) { const int angle_rounded = (int)floor(angle * 100); + + if (bgcolor < 0) { + return NULL; + } /* no interpolation needed here */ switch (angle_rounded) { |