Commit: f39a23696ba89d0dc77f7715f04ca7d1aa5b696e Author: Pierre Joye <pierre....@gmail.com> Fri, 22 Mar 2013 09:30:23 +0100 Parents: f05972ddbf703da35ae9bde5c89d6f55f178b939 Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f39a23696ba89d0dc77f7715f04ca7d1aa5b696e Log: - fix regression (imagerotate_overflow.phpt), fix for all cases Changed paths: M ext/gd/gd.c M ext/gd/libgd/gd_interpolation.c Diff: diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 58027d7..74ce32c 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2271,6 +2271,10 @@ 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_interpolation.c b/ext/gd/libgd/gd_interpolation.c index 0215c23..e1c8728 100644 --- a/ext/gd/libgd/gd_interpolation.c +++ b/ext/gd/libgd/gd_interpolation.c @@ -825,10 +825,6 @@ int getPixelInterpolated(gdImagePtr im, const double x, const double y, const in return -1; } - /* Default to full alpha */ - if (bgColor == -1) { - } - if (im->interpolation_id == GD_WEIGHTED4) { return getPixelInterpolateWeight(im, x, y, bgColor); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php