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
Explain preg_Match and preg_replace?
Which methods should be used for sending an email using the variables $to, $subject, and $body?
What is a php web application?
Why session is required?
How many escape sequences are recognized in double-quoted strings in php?
How does php work?
How to create a directory?
How do you call a constructor for a parent class?
What are include() and require() functions?
Which framework is best for php?
what is the use of include_once in php?
What distinguishes php from something like client side java script?
How can I find my php version?
Tell me when a conditional statement is ended with an endif?
Which method removes the last element from the end of an array?