Home > PHP > Function > GD > imagecolortransparent()

imagecolortransparent()

imagecolortransparent - Define a color as transparent

Syntax

int imagecolortransparent (resource $image, int $color)

Arguments

  • image - An image resource, returned by one of the image creation functions, such as imagecreatetruecolor().
  • color - A color identifier created with imagecolorallocate().

Description

Sets the transparent color in the given image.

Version

PHP 4, 5

Return value

The identifier of the new (or current, if none is specified) transparent color is returned.