PHP imagecolorresolve - Get the index value of the specified color or the closest possible substitute

PHP 图像处理PHP Image Processing

imagecolorresolve — Get the index value of the specified color or the closest possible substitute.

Syntax

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

This function guarantees that a color index is returned for the requested color, either the exact value or the closest substitute that can be obtained.

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

Related Articles

PHP 图像处理PHP Image Processing

Other Extensions