summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2009-01-15 07:57:11 +0000
committerKalle Sommer Nielsen <kalle@php.net>2009-01-15 07:57:11 +0000
commitbe7d6a629925b3c93794c9eaafcd4cc8ff934257 (patch)
tree6827d6a27dbe6e4124bd7424f526aaa6276e6d7f /ext/gd
parenta6263465cf030b59a114411742c915c7aae86647 (diff)
downloadphp-git-be7d6a629925b3c93794c9eaafcd4cc8ff934257.tar.gz
MFH: Change optional parameter for IMG_FILTER_PIXELATE to be a boolean
Added missing NEWS log entry for the new pixelation filter
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/gd.c5
-rw-r--r--ext/gd/tests/imagefilter.phpt2
2 files changed, 4 insertions, 3 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index f012d9a5e5..5cb2129798 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -4922,9 +4922,10 @@ static void php_image_filter_pixelate(INTERNAL_FUNCTION_PARAMETERS)
{
zval *IM;
gdImagePtr im;
- long tmp, blocksize, mode = 0;
+ long tmp, blocksize;
+ zend_bool mode = 0;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll|l", &IM, &tmp, &blocksize, &mode) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll|b", &IM, &tmp, &blocksize, &mode) == FAILURE) {
RETURN_FALSE;
}
diff --git a/ext/gd/tests/imagefilter.phpt b/ext/gd/tests/imagefilter.phpt
index b62b5facfd..8b17fb80b1 100644
--- a/ext/gd/tests/imagefilter.phpt
+++ b/ext/gd/tests/imagefilter.phpt
@@ -75,7 +75,7 @@ $SOURCE_IMG = $SAVE_DIR . "/test.png";
$im = imagecreatefrompng($SOURCE_IMG);
- if (imagefilter($im, IMG_FILTER_PIXELATE, 5, 1)) {
+ if (imagefilter($im, IMG_FILTER_PIXELATE, 5, true)) {
imagepng($im, $SAVE_DIR . "/IMG_FILTER_PIXELATE.png");
echo "IMG_FILTER_PIXELATE success\n";
unlink($SAVE_DIR . "/IMG_FILTER_PIXELATE.png");