PHP | imagealphablending() Function
The imagealphablending() function is an inbuilt function in PHP which is used to set the blending mode for an image. This function allows to two different modes (blending mode and non-blending mode) to drawing truecolor images. Blending mode is not available when drawing used palette images.
bool imagealphablending( $image, $blendmode )
Parameters: This function accepts two parameters as mentioned above and described below:
- $image: It is returned by one of the image creation functions, such as imagecreatetruecolor(). It is used to create size of image.
- $blendmode: This parameter is used to check the blending mode is enable or not. The default value is True for true color image and False otherwise.
Return Value: This function returns True on success or False on failure.
Below programs illustrate the imagealphablending() function in PHP: