MFH: Change optional parameter for IMG_FILTER_PIXELATE to be a boolean

Added missing NEWS log entry for the new pixelation filter
This commit is contained in:
Kalle Sommer Nielsen 2009-01-15 07:57:11 +00:00
parent a6263465cf
commit be7d6a6299
3 changed files with 5 additions and 3 deletions

1
NEWS
View File

@ -35,6 +35,7 @@ PHP NEWS
- Added depth parameter to json_decode() to lower the nesting depth from the
maximum if required. (Scott)
- Added ICU support to SQLite3 when using the bundled version. (Scott)
- Added pixelation support in imagefilter(). (Takeshi Abe, Kalle)
- Re-added socket_create_pair() for Windows in sockets extension. (Kalle)

View File

@ -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;
}

View File

@ -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");