]> granicus.if.org Git - php/commitdiff
Remove unused code
authorChristoph M. Becker <cmbecker69@gmx.de>
Fri, 1 Nov 2019 22:48:05 +0000 (23:48 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 1 Nov 2019 23:10:46 +0000 (00:10 +0100)
These are left-overs from image2wbmp(), which has already been removed.

ext/gd/gd.c
ext/gd/php_gd.h

index 7b973fff7983b0f1c30c19348d0357d12eb8b440..989a78cb0bce6a6a382a154b07e5ded40d010033 100644 (file)
@@ -2005,15 +2005,6 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
                }
 
                switch (image_type) {
-                       case PHP_GDIMG_CONVERT_WBM:
-                               if (q == -1) {
-                                       q = 0;
-                               } else if (q < 0 || q > 255) {
-                                       php_error_docref(NULL, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q);
-                                       q = 0;
-                               }
-                               gdImageWBMP(im, q, fp);
-                               break;
                        case PHP_GDIMG_TYPE_GD:
                                (*func_p)(im, fp);
                                break;
@@ -2041,15 +2032,6 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
                }
 
                switch (image_type) {
-                       case PHP_GDIMG_CONVERT_WBM:
-                               if (q == -1) {
-                                       q = 0;
-                               } else if (q < 0 || q > 255) {
-                                       php_error_docref(NULL, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q);
-                                       q = 0;
-                               }
-                               gdImageWBMP(im, q, tmp);
-                               break;
                        case PHP_GDIMG_TYPE_GD:
                                (*func_p)(im, tmp);
                                break;
index 4f083578809009b7c3d825c6e7fadb0270a5b9a9..8e4cff35ef595ec703fc319cc37f144026b89393 100644 (file)
@@ -33,7 +33,6 @@
 #define PHP_GDIMG_TYPE_WBM      4
 #define PHP_GDIMG_TYPE_XBM      5
 #define PHP_GDIMG_TYPE_XPM      6
-#define PHP_GDIMG_CONVERT_WBM   7
 #define PHP_GDIMG_TYPE_GD       8
 #define PHP_GDIMG_TYPE_GD2      9
 #define PHP_GDIMG_TYPE_GD2PART  10