imagecolorallocatealpha()
imagecolorallocatealpha - Allocate a color for an image
Syntax
int imagecolorallocatealpha (
resource $image,
int $red,
int $green,
int $blue,
int $alpha)
Arguments
- image - An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().
- red - Value of red component.
- green - Value of green component.
- blue - Value of blue component.
- alpha - A value between 0and 127. 0indicates completely opaque while 127indicates completely transparent.
Description
imagecolorallocatealpha() behaves identically to imagecolorallocate() with the addition of the transparency parameter alpha.
Version
PHP 4.3.2, 5
Return value
A color identifier or FALSE if the allocation failed.