Skip to content

Commit dfa6c20

Browse files
committed
Remove deprecated image2wbmp()
Cf. <https://wiki.php.net/rfc/image2wbmp>.
1 parent a9a02ca commit dfa6c20

File tree

6 files changed

+8
-39
lines changed

6 files changed

+8
-39
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ PHP NEWS
55
- Core:
66
. Fixed bug #NNNNN (Summary). (Author)
77

8+
- GD:
9+
. Removed deprecated image2wbmp(). (cmb)
10+
811
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>

UPGRADING

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ PHP 8.0 UPGRADE NOTES
2323
- Core:
2424
. TBD
2525

26+
- GD:
27+
. The deprecated function image2wbmp() has been removed.
28+
RFC: https://wiki.php.net/rfc/image2wbmp
29+
2630
========================================
2731
2. New Features
2832
========================================

ext/gd/gd.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -758,12 +758,6 @@ ZEND_BEGIN_ARG_INFO(arginfo_imagettftext, 0)
758758
ZEND_END_ARG_INFO()
759759
#endif
760760

761-
ZEND_BEGIN_ARG_INFO_EX(arginfo_image2wbmp, 0, 0, 1)
762-
ZEND_ARG_INFO(0, im)
763-
ZEND_ARG_INFO(0, filename)
764-
ZEND_ARG_INFO(0, foreground)
765-
ZEND_END_ARG_INFO()
766-
767761
#if defined(HAVE_GD_JPG)
768762
ZEND_BEGIN_ARG_INFO(arginfo_jpeg2wbmp, 0)
769763
ZEND_ARG_INFO(0, f_org)
@@ -997,7 +991,6 @@ static const zend_function_entry gd_functions[] = {
997991
#if defined(HAVE_GD_PNG)
998992
PHP_DEP_FE(png2wbmp, arginfo_png2wbmp)
999993
#endif
1000-
PHP_DEP_FE(image2wbmp, arginfo_image2wbmp)
1001994
PHP_FE(imagelayereffect, arginfo_imagelayereffect)
1002995
PHP_FE(imagexbm, arginfo_imagexbm)
1003996

@@ -2594,7 +2587,6 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
25942587
int argc = ZEND_NUM_ARGS();
25952588
int q = -1, i, t = 1;
25962589

2597-
/* The quality parameter for Wbmp stands for the foreground when called from image2wbmp() */
25982590
/* When called from imagewbmp() the quality parameter stands for the foreground color. Default: black. */
25992591
/* The quality parameter for gd2 stands for chunk size */
26002592

@@ -4067,14 +4059,6 @@ static void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode, int
40674059
/* }}} */
40684060
#endif /* ENABLE_GD_TTF */
40694061

4070-
/* {{{ proto bool image2wbmp(resource im [, string filename [, int foreground]])
4071-
Output WBMP image to browser or file */
4072-
PHP_FUNCTION(image2wbmp)
4073-
{
4074-
_php_image_output(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_CONVERT_WBM, "WBMP", NULL);
4075-
}
4076-
/* }}} */
4077-
40784062
#if defined(HAVE_GD_JPG)
40794063
/* {{{ proto bool jpeg2wbmp(string f_org, string f_dest, int d_height, int d_width, int threshold)
40804064
Convert JPEG image to WBMP image */

ext/gd/gd_ctx.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
9393
php_stream *stream;
9494
int close_stream = 1;
9595

96-
/* The third (quality) parameter for Wbmp stands for the foreground when called from image2wbmp().
97-
* The third (quality) parameter for Wbmp and Xbm stands for the foreground color index when called
96+
/* The third (quality) parameter for Wbmp and Xbm stands for the foreground color index when called
9897
* from imagey<type>().
9998
*/
10099
switch (image_type) {

ext/gd/php_gd.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ PHP_FUNCTION(imagettftext);
206206

207207
PHP_FUNCTION(jpeg2wbmp);
208208
PHP_FUNCTION(png2wbmp);
209-
PHP_FUNCTION(image2wbmp);
210209

211210
PHP_FUNCTION(imagecolormatch);
212211

ext/gd/tests/image2wbmp_error.phpt

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)