mirror of
https://github.com/php/php-src.git
synced 2026-04-11 01:53:36 +02:00
- Added imagecreatefromwbmp().
- Fixed missing parenthesis when calling function get_active_function_name. @- Added function imagecreatefromwbmp(). (Jouni)
This commit is contained in:
20
ext/gd/gd.c
20
ext/gd/gd.c
@@ -117,6 +117,7 @@ function_entry gd_functions[] = {
|
||||
PHP_FE(imagegif, NULL)
|
||||
PHP_FE(imagecreatefromjpeg, NULL)
|
||||
PHP_FE(imagejpeg, NULL)
|
||||
PHP_FE(imagecreatefromwbmp, NULL)
|
||||
PHP_FE(imagewbmp, NULL)
|
||||
PHP_FE(imagecreatefromxbm, NULL)
|
||||
PHP_FE(imagecreatefromxpm, NULL)
|
||||
@@ -453,7 +454,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
|
||||
fclose(fp);
|
||||
|
||||
if (!im) {
|
||||
php_error(E_WARNING,"%s: '%s' is not a valid %s file", get_active_function_name, fn, tn);
|
||||
php_error(E_WARNING,"%s: '%s' is not a valid %s file", get_active_function_name(), fn, tn);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -529,6 +530,19 @@ PHP_FUNCTION(imagecreatefromxpm)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int imagecreatefromwbmp(string filename)
|
||||
Create a new image from WBMP file or URL */
|
||||
PHP_FUNCTION(imagecreatefromwbmp)
|
||||
{
|
||||
#ifdef HAVE_GD_WBMP
|
||||
_php_image_create_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, "WBMP", gdImageCreateFromWBMP);
|
||||
#else /* HAVE_GD_WBMP */
|
||||
php_error(E_WARNING, "ImageCreateFromWBMP: No WBMP support in this PHP build");
|
||||
RETURN_FALSE;
|
||||
#endif /* HAVE_GD_WBMP */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, void (*func_p)()) {
|
||||
zval **imgind, **file, **quality;
|
||||
gdImagePtr im;
|
||||
@@ -648,7 +662,11 @@ PHP_FUNCTION(imagejpeg)
|
||||
Output WBMP image to browser or file */
|
||||
PHP_FUNCTION(imagewbmp)
|
||||
{
|
||||
#ifdef HAVE_GD_WBMP
|
||||
_php_image_output(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, "WBMP", gdImageWBMP);
|
||||
#else
|
||||
_php_image_output(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WBM, "WBMP", _php_image_output_wbmp);
|
||||
#endif
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ PHP_FUNCTION(imagesx);
|
||||
PHP_FUNCTION(imagesy);
|
||||
PHP_FUNCTION(imagecreatefrompng);
|
||||
PHP_FUNCTION(imagepng);
|
||||
PHP_FUNCTION(imagecreatefromwbmp);
|
||||
PHP_FUNCTION(imagewbmp);
|
||||
void php_gdimagecharup(gdImagePtr, gdFontPtr, int, int, int, int);
|
||||
PHP_FUNCTION(imagedashedline);
|
||||
|
||||
Reference in New Issue
Block a user