mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
- Make GD functions only available if they really exist (Patch by
matslin@orakel.ntnu.no)
This commit is contained in:
parent
7ce7a73095
commit
d5fee0cb0c
1 changed files with 36 additions and 4 deletions
40
ext/gd/gd.c
40
ext/gd/gd.c
|
@ -141,22 +141,45 @@ function_entry gd_functions[] = {
|
||||||
PHP_FE(imagecopymergegray, NULL)
|
PHP_FE(imagecopymergegray, NULL)
|
||||||
|
|
||||||
PHP_FE(imagecreatefromstring, NULL)
|
PHP_FE(imagecreatefromstring, NULL)
|
||||||
|
#ifdef HAVE_GD_PNG
|
||||||
PHP_FE(imagecreatefrompng, NULL)
|
PHP_FE(imagecreatefrompng, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GD_GIF_READ
|
||||||
PHP_FE(imagecreatefromgif, NULL)
|
PHP_FE(imagecreatefromgif, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GD_JPG
|
||||||
PHP_FE(imagecreatefromjpeg, NULL)
|
PHP_FE(imagecreatefromjpeg, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GD_WBMP
|
||||||
PHP_FE(imagecreatefromwbmp, NULL)
|
PHP_FE(imagecreatefromwbmp, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GD_XBM
|
||||||
PHP_FE(imagecreatefromxbm, NULL)
|
PHP_FE(imagecreatefromxbm, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GD_XPM
|
||||||
PHP_FE(imagecreatefromxpm, NULL)
|
PHP_FE(imagecreatefromxpm, NULL)
|
||||||
|
#endif
|
||||||
PHP_FE(imagecreatefromgd, NULL)
|
PHP_FE(imagecreatefromgd, NULL)
|
||||||
|
#ifdef HAVE_GD_GD2
|
||||||
PHP_FE(imagecreatefromgd2, NULL)
|
PHP_FE(imagecreatefromgd2, NULL)
|
||||||
PHP_FE(imagecreatefromgd2part, NULL)
|
PHP_FE(imagecreatefromgd2part, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GD_PNG
|
||||||
PHP_FE(imagepng, NULL)
|
PHP_FE(imagepng, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GD_GIF_CREATE
|
||||||
PHP_FE(imagegif, NULL)
|
PHP_FE(imagegif, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GD_JPG
|
||||||
PHP_FE(imagejpeg, NULL)
|
PHP_FE(imagejpeg, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GD_WBMP
|
||||||
PHP_FE(imagewbmp, NULL)
|
PHP_FE(imagewbmp, NULL)
|
||||||
|
#endif
|
||||||
PHP_FE(imagegd, NULL)
|
PHP_FE(imagegd, NULL)
|
||||||
|
#ifdef HAVE_GD_GD2
|
||||||
PHP_FE(imagegd2, NULL)
|
PHP_FE(imagegd2, NULL)
|
||||||
|
#endif
|
||||||
|
|
||||||
PHP_FE(imagedestroy, NULL)
|
PHP_FE(imagedestroy, NULL)
|
||||||
PHP_FE(imagegammacorrect, NULL)
|
PHP_FE(imagegammacorrect, NULL)
|
||||||
|
@ -177,10 +200,13 @@ function_entry gd_functions[] = {
|
||||||
PHP_FE(imagesx, NULL)
|
PHP_FE(imagesx, NULL)
|
||||||
PHP_FE(imagesy, NULL)
|
PHP_FE(imagesy, NULL)
|
||||||
PHP_FE(imagedashedline, NULL)
|
PHP_FE(imagedashedline, NULL)
|
||||||
|
#ifdef ENABLE_GD_TTF
|
||||||
PHP_FE(imagettfbbox, NULL)
|
PHP_FE(imagettfbbox, NULL)
|
||||||
PHP_FE(imagettftext, NULL)
|
PHP_FE(imagettftext, NULL)
|
||||||
PHP_FE(imageftbbox, NULL)
|
PHP_FE(imageftbbox, NULL)
|
||||||
PHP_FE(imagefttext, NULL)
|
PHP_FE(imagefttext, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBT1
|
||||||
PHP_FE(imagepsloadfont, NULL)
|
PHP_FE(imagepsloadfont, NULL)
|
||||||
/*
|
/*
|
||||||
PHP_FE(imagepscopyfont, NULL)
|
PHP_FE(imagepscopyfont, NULL)
|
||||||
|
@ -191,12 +217,18 @@ function_entry gd_functions[] = {
|
||||||
PHP_FE(imagepsslantfont, NULL)
|
PHP_FE(imagepsslantfont, NULL)
|
||||||
PHP_FE(imagepstext, NULL)
|
PHP_FE(imagepstext, NULL)
|
||||||
PHP_FE(imagepsbbox, NULL)
|
PHP_FE(imagepsbbox, NULL)
|
||||||
|
#endif
|
||||||
PHP_FE(imagetypes, NULL)
|
PHP_FE(imagetypes, NULL)
|
||||||
|
|
||||||
|
#if defined(HAVE_GD_JPG) && defined(HAVE_GD_WBMP)
|
||||||
PHP_FE(jpeg2wbmp, NULL)
|
PHP_FE(jpeg2wbmp, NULL)
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_GD_PNG) && defined(HAVE_GD_WBMP)
|
||||||
PHP_FE(png2wbmp, NULL)
|
PHP_FE(png2wbmp, NULL)
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_GD_WBMP
|
||||||
PHP_FE(image2wbmp, NULL)
|
PHP_FE(image2wbmp, NULL)
|
||||||
|
#endif
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue