Skip to content

Commit

Permalink
Remove deprecated image2wbmp()
Browse files Browse the repository at this point in the history
  • Loading branch information
cmb69 committed Jan 28, 2019
1 parent a9a02ca commit dfa6c20
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 39 deletions.
3 changes: 3 additions & 0 deletions NEWS
Expand Up @@ -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! >>>
4 changes: 4 additions & 0 deletions UPGRADING
Expand Up @@ -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
========================================
Expand Down
16 changes: 0 additions & 16 deletions ext/gd/gd.c
Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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 */

Expand Down Expand Up @@ -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 */
Expand Down
3 changes: 1 addition & 2 deletions ext/gd/gd_ctx.c
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion ext/gd/php_gd.h
Expand Up @@ -206,7 +206,6 @@ PHP_FUNCTION(imagettftext);

PHP_FUNCTION(jpeg2wbmp);
PHP_FUNCTION(png2wbmp);
PHP_FUNCTION(image2wbmp);

PHP_FUNCTION(imagecolormatch);

Expand Down
20 changes: 0 additions & 20 deletions ext/gd/tests/image2wbmp_error.phpt

This file was deleted.

0 comments on commit dfa6c20

Please sign in to comment.