Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP imagealphablending - Set the Blending Mode of the Image

PHP imagealphablending - Set the Blending Mode of the Image

PHP Image ProcessingPHP Image Processing

imagealphablending — Sets the blending mode of the image.

Syntax



bool imagealphablending ( resource $image , bool $blendmode )

imagealphablending() allows two different drawing modes to be used on true-color images.

In blending mode, the alpha channel color component is provided to all drawing functions, such as imagesetpixel(), which determines the extent to which the underlying color is allowed to show through. As a result, GD automatically blends the existing color of that point with the brush color and stores the result in the image. The resulting pixel is opaque.

In non-blending mode, the brush color along with its alpha channel information is copied, replacing the destination pixel. Blending mode is unavailable when drawing palette images.

If blendmode is TRUE, blending mode is enabled; otherwise it is disabled. Returns TRUE on success, or FALSE on failure.

Parameters

Return Value

Returns TRUE on success, or FALSE on failure.

Example





PHP Image ProcessingPHP Image Processing