mirror of
https://github.com/php/php-src.git
synced 2026-04-25 08:58:28 +02:00
Add imageistruecolor
This commit is contained in:
+19
-1
@@ -156,12 +156,13 @@ function_entry gd_functions[] = {
|
||||
PHP_FE(imageellipse, NULL)
|
||||
PHP_FE(imagechar, NULL)
|
||||
PHP_FE(imagecharup, NULL)
|
||||
PHP_FE(imagecolorat, NULL)
|
||||
PHP_FE(imagecolorallocate, NULL)
|
||||
#if HAVE_LIBGD15
|
||||
PHP_FE(imagepalettecopy, NULL)
|
||||
PHP_FE(imagecreatefromstring, NULL)
|
||||
#endif
|
||||
PHP_FE(imagecolorat, NULL)
|
||||
PHP_FE(imageistruecolor, NULL)
|
||||
PHP_FE(imagecolorclosest, NULL)
|
||||
#if HAVE_COLORCLOSESTHWB
|
||||
PHP_FE(imagecolorclosesthwb, NULL)
|
||||
@@ -1750,6 +1751,23 @@ PHP_FUNCTION(imagedestroy)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int imagecolorallocate(int im, int red, int green, int blue)
|
||||
Allocate a color for an image */
|
||||
PHP_FUNCTION(imageistruecolor)
|
||||
{
|
||||
zval **IM;
|
||||
gdImagePtr im;
|
||||
|
||||
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &IM) == FAILURE) {
|
||||
ZEND_WRONG_PARAM_COUNT();
|
||||
}
|
||||
|
||||
ZEND_FETCH_RESOURCE(im, gdImagePtr, IM, -1, "Image", le_gd);
|
||||
|
||||
RETURN_BOOL(im->trueColor);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto int imagecolorallocate(int im, int red, int green, int blue)
|
||||
Allocate a color for an image */
|
||||
PHP_FUNCTION(imagecolorallocate)
|
||||
|
||||
@@ -64,6 +64,7 @@ PHP_FUNCTION(gd_info);
|
||||
PHP_FUNCTION(imagearc);
|
||||
PHP_FUNCTION(imagechar);
|
||||
PHP_FUNCTION(imagecharup);
|
||||
PHP_FUNCTION(imageistruecolor);
|
||||
PHP_FUNCTION(imagecolorallocate);
|
||||
PHP_FUNCTION(imagepalettecopy);
|
||||
PHP_FUNCTION(imagecolorat);
|
||||
|
||||
Reference in New Issue
Block a user