]> granicus.if.org Git - php/commitdiff
Remove deprecated image2wbmp()
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 28 Jan 2019 13:29:06 +0000 (14:29 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 28 Jan 2019 13:29:06 +0000 (14:29 +0100)
Cf. <https://wiki.php.net/rfc/image2wbmp>.

NEWS
UPGRADING
ext/gd/gd.c
ext/gd/gd_ctx.c
ext/gd/php_gd.h
ext/gd/tests/image2wbmp_error.phpt [deleted file]

diff --git a/NEWS b/NEWS
index 687584aea5d2545b3249c2bcb1cf3c282ed4eacf..cfa0abc5789d78920a5528692391696fd376c319 100644 (file)
--- a/NEWS
+++ b/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! >>>
index 7563dfdfb03c1cbfd639b5f35d527cec480eec82..87cd96a6d78f3943f54ec374799eb899a1b60faa 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -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
 ========================================
index d4e4db1be6bdd5937d7e5a747a1f191a0f4bbc52..4455d8b8d4771ac0856dab4292fa8eb747831f74 100644 (file)
@@ -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 */
index d1c3771f2354e1353623c122c3177ab72118b49f..eae3aef255e49a33796c44e810f2af666eba968f 100644 (file)
@@ -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) {
index 171c71191db9a09f5a00264c9a5ab8f877b78eee..5c8aeb6e764bd5810d439aca6bce7b6d409ca2d0 100644 (file)
@@ -206,7 +206,6 @@ PHP_FUNCTION(imagettftext);
 
 PHP_FUNCTION(jpeg2wbmp);
 PHP_FUNCTION(png2wbmp);
-PHP_FUNCTION(image2wbmp);
 
 PHP_FUNCTION(imagecolormatch);
 
diff --git a/ext/gd/tests/image2wbmp_error.phpt b/ext/gd/tests/image2wbmp_error.phpt
deleted file mode 100644 (file)
index 8d8d836..0000000
+++ /dev/null
@@ -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===