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
Does facebook use php framework?
What is faster?
What are the functions of string?
How to get useful error messages in php?
How php statement is different from php script?
Write a query to find the 2nd highest salary of an employee from the employee table?
What is warning – “cannot modify header information – headers already sent”?
what is constructor
What is the use of super-global arrays in php?
Explain different sorting function in php?
How to find length of an array in php ?
What is the function mysql_pconnect() usefull for?
What would occur if a fatal error was thrown in your php program?
How do I escape data before storing it in the database?
How do I know my xampp version?