Function __global->imagecolorallocatealpha
Definitions
sources_custom/phpstub.php
- Allocate a color for an image, with an alpha-component.
- 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 | The image handle |
| $red | integer | No | No | required parameter | N/A | N/A | Red component (0-255) |
| $green | integer | No | No | required parameter | N/A | N/A | Green component (0-255) |
| $blue | integer | No | No | required parameter | N/A | N/A | Blue component (0-255) |
| $alpha | integer | No | No | required parameter | N/A | N/A | Alpha component (0-127) |
Returns
- Combined colour identifier
- Type: integer
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Allocate a color for an image, with an alpha-component.
*
* @param resource $image The image handle
* @param integer $red Red component (0-255)
* @param integer $green Green component (0-255)
* @param integer $blue Blue component (0-255)
* @param integer $alpha Alpha component (0-127)
* @return integer Combined colour identifier
*/
function imagecolorallocatealpha($image, int $red, int $green, int $blue, int $alpha) : int
* Allocate a color for an image, with an alpha-component.
*
* @param resource $image The image handle
* @param integer $red Red component (0-255)
* @param integer $green Green component (0-255)
* @param integer $blue Blue component (0-255)
* @param integer $alpha Alpha component (0-127)
* @return integer Combined colour identifier
*/
function imagecolorallocatealpha($image, int $red, int $green, int $blue, int $alpha) : int

