mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Remove deprecated image2wbmp()
Cf. <https://wiki.php.net/rfc/image2wbmp>.
This commit is contained in:
parent
a9a02ca02b
commit
dfa6c2046a
6 changed files with 8 additions and 39 deletions
3
NEWS
3
NEWS
|
@ -5,4 +5,7 @@ PHP NEWS
|
|||
- Core:
|
||||
. Fixed bug #NNNNN (Summary). (Author)
|
||||
|
||||
- GD:
|
||||
. Removed deprecated image2wbmp(). (cmb)
|
||||
|
||||
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
|
||||
|
|
|
@ -23,6 +23,10 @@ PHP 8.0 UPGRADE NOTES
|
|||
- Core:
|
||||
. TBD
|
||||
|
||||
- GD:
|
||||
. The deprecated function image2wbmp() has been removed.
|
||||
RFC: https://wiki.php.net/rfc/image2wbmp
|
||||
|
||||
========================================
|
||||
2. New Features
|
||||
========================================
|
||||
|
|
16
ext/gd/gd.c
16
ext/gd/gd.c
|
@ -758,12 +758,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagettftext, 0)
|
|||
ZEND_END_ARG_INFO()
|
||||
#endif
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_image2wbmp, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, im)
|
||||
ZEND_ARG_INFO(0, filename)
|
||||
ZEND_ARG_INFO(0, foreground)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#if defined(HAVE_GD_JPG)
|
||||
ZEND_BEGIN_ARG_INFO(arginfo_jpeg2wbmp, 0)
|
||||
ZEND_ARG_INFO(0, f_org)
|
||||
|
@ -997,7 +991,6 @@ static const zend_function_entry gd_functions[] = {
|
|||
#if defined(HAVE_GD_PNG)
|
||||
PHP_DEP_FE(png2wbmp, arginfo_png2wbmp)
|
||||
#endif
|
||||
PHP_DEP_FE(image2wbmp, arginfo_image2wbmp)
|
||||
PHP_FE(imagelayereffect, arginfo_imagelayereffect)
|
||||
PHP_FE(imagexbm, arginfo_imagexbm)
|
||||
|
||||
|
@ -2594,7 +2587,6 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
|
|||
int argc = ZEND_NUM_ARGS();
|
||||
int q = -1, i, t = 1;
|
||||
|
||||
/* The quality parameter for Wbmp stands for the foreground when called from image2wbmp() */
|
||||
/* When called from imagewbmp() the quality parameter stands for the foreground color. Default: black. */
|
||||
/* The quality parameter for gd2 stands for chunk size */
|
||||
|
||||
|
@ -4067,14 +4059,6 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
|
|||
/* }}} */
|
||||
#endif /* ENABLE_GD_TTF */
|
||||
|
||||
/* {{{ proto bool image2wbmp(resource im [, string filename [, int foreground]])
|
||||
Output WBMP image to browser or file */
|
||||
PHP_FUNCTION(image2wbmp)
|
||||
{
|
||||
_php_image_output(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_CONVERT_WBM, "WBMP", NULL);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if defined(HAVE_GD_JPG)
|
||||
/* {{{ proto bool jpeg2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold)
|
||||
Convert JPEG image to WBMP image */
|
||||
|
|
|
@ -93,8 +93,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
|
|||
php_stream *stream;
|
||||
int close_stream = 1;
|
||||
|
||||
/* The third (quality) parameter for Wbmp stands for the foreground when called from image2wbmp().
|
||||
* The third (quality) parameter for Wbmp and Xbm stands for the foreground color index when called
|
||||
/* The third (quality) parameter for Wbmp and Xbm stands for the foreground color index when called
|
||||
* from imagey<type>().
|
||||
*/
|
||||
switch (image_type) {
|
||||
|
|
|
@ -206,7 +206,6 @@ PHP_FUNCTION(imagettftext);
|
|||
|
||||
PHP_FUNCTION(jpeg2wbmp);
|
||||
PHP_FUNCTION(png2wbmp);
|
||||
PHP_FUNCTION(image2wbmp);
|
||||
|
||||
PHP_FUNCTION(imagecolormatch);
|
||||
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
--TEST--
|
||||
image2wbmp() is deprecated
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$im = imagecreate(10, 10);
|
||||
imagecolorallocate($im, 0, 0, 0);
|
||||
image2wbmp($im, __DIR__ . '/image2wbmp_error.wbmp');
|
||||
?>
|
||||
===DONE===
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink(__DIR__ . '/image2wbmp_error.wbmp');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Deprecated: Function image2wbmp() is deprecated in %s on line %d
|
||||
===DONE===
|
Loading…
Add table
Add a link
Reference in a new issue