PHP » GoLang |
login |
register |
about
|
GoLang imagecolorexact
request it (666)
GoLang replacement for PHP's imagecolorexact
[edit | history]
imagecolorexact(PHP 4, PHP 5, PHP 7) imagecolorexact — Get the index of the specified color Description
int imagecolorexact
( resource
$image
, int $red
, int $green
, int $blue
)Returns the index of the specified color in the palette of the image. If you created the image from a file, only colors used in the image are resolved. Colors present only in the palette are not resolved. Parameters
Return ValuesReturns the index of the specified color in the palette, or -1 if the color does not exist. ExamplesExample #1 Get colors from the GD logo
<?phpThe above example will output something similar to:
Array
(
[0] => 16711680
[1] => 0
[2] => 16777215
[3] => 6618932
)
|
more
Most requested
more
Last requests
|