imagecolorat
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get the index of the color of a pixel
imagecolorat
(
GdImage $image
,
int $x
,
int $y
):
int
|
false
Intervention/image
$format
=
$this
->
argument
(
2
)->
type
(
'string'
)->
value
(
'array'
);
$color
=
imagecolorat
(
$image
->
getCore
(),
$x
,
$y
);
if ( !
imageistruecolor
(
$image
->
getCore
())) {
$color
=
imagecolorsforindex
(
$image
->
getCore
(),
$color
);
src/Intervention/Image/Gd/Commands/PickColorCommand.php