Function __global->cms_imagecolorallocate
Definitions
sources/images.php
- Safe GD image colour allocation.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $image | resource | No | No | required parameter | N/A | N/A | Image resource |
| $red | integer | No | No | required parameter | N/A | N/A | RGB red value to allocate |
| $green | integer | No | No | required parameter | N/A | N/A | RGB green value to allocate |
| $blue | integer | No | No | required parameter | N/A | N/A | RGB blue value to allocate |
Returns
- Colour identifier
- Type: integer
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Safe GD image colour allocation.
*
* @param resource $image Image resource
* @param integer $red RGB red value to allocate
* @param integer $green RGB green value to allocate
* @param integer $blue RGB blue value to allocate
* @return integer Colour identifier
*/
function cms_imagecolorallocate($image, int $red, int $green, int $blue) : int
* Safe GD image colour allocation.
*
* @param resource $image Image resource
* @param integer $red RGB red value to allocate
* @param integer $green RGB green value to allocate
* @param integer $blue RGB blue value to allocate
* @return integer Colour identifier
*/
function cms_imagecolorallocate($image, int $red, int $green, int $blue) : int

