PHP imagecolorexact - Get the index value of the specified color

PHP 图像处理PHP Image Processing

imagecolorexact — Get the index value of the specified color.

Syntax

int imagecolorexact ( resource $image , int $red , int $green , int $blue )

Returns the index value of the specified color in the image palette.

Returns -1 if the color is not in the image palette.

If the image was created from a file, only colors used in the image are resolved. Colors appearing only in the palette are not resolved.

Related Articles

PHP 图像处理PHP Image Processing

Other Extensions