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
Is age interval or ordinal data?
How do I start a php session?
Which functions are used to count the total number of array elements in php?
How to turn on the session support in php?
What is smarty?
How to move uploaded files to permanent directory?
What are php keywords?
What is a static method php?
What are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?
What is the purpose of the '.myd' file extension? What do thes file contain?
What are the advantages of indexes?
How can we automatically escape incoming data?
What is the use of mysql_fetch_assoc in php?
What is the meaning of a final class and a final method?
How to redirect https to http url through .htaccess?