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 I can control asset documents without GR/IR?
What do you mean range() in php?
How to merge values of two arrays into a single array?
How do you check is php not empty?
How many escape sequences are recognized in single-quoted strings?
Explain how can we execute a php script using command line?
How to track no of user logged in?
Is variable name casesensitive in php?
Where is my php ini file?
What is a namespace in php?
How to support multiple-page forms?
What is difference between print_r and echo in php?
What is the use of "enctype" attribute in a html form?
How error handling is being handled by php?
What type of errors can be occurred in php?