How can I find the colour of a pixel of an image?
Answer Posted / laxmikant
<?php
$im = imagecreatefrompng("php.png");
$rgb = imagecolorat($im, 10, 15);
$r = ($rgb >> 16) & 0xFF;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;
var_dump($r, $g, $b);
?>
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to delete an element from an array?
What is full form of php? Who is the father or inventor of php?
Is php easier than node?
Can you convert php to html?
What are the different filter functions used to filter a variable?
How is it possible to propagate a session id?
What are php magic methods?
How does html form submit work?
What is the use of imagetypes() method?
Is null or empty c#?
What is composer install?
What do you mean range() in php?
Under what circumstance is it impossible to assign a default value to a parameter while declaring a function?
How does php and apache work?
Where php basically used?