mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
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:
parent
a6263465cf
commit
be7d6a6299
1
NEWS
1
NEWS
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user