Easy Tutorial
❮ Php Form Url Email Func String Html Entity Decode ❯

PHP imagecolortransparent - Define a Color as Transparent

PHP Image Processing

imagecolortransparent — Define a color as transparent.

Syntax

int imagecolortransparent ( resource $image [, int $color ] )

imagecolortransparent() sets the transparent color in the image to color. image is the image identifier returned by imagecreatetruecolor(), and color is the color identifier returned by imagecolorallocate().

Note: Transparency is an attribute of the image, not an attribute of the color. Once a color is set as transparent, any areas of the image that were previously drawn in that color become transparent.

Returns the identifier of the new transparent color, or if color is omitted, returns the identifier of the current transparent color.

Note: Transparency can only be copied through imagecopymerge() and true color images, not with imagecopy() or palette images.

PHP Image Processing

❮ Php Form Url Email Func String Html Entity Decode ❯