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
What is serialization in php?
What is warning – “cannot modify header information – headers already sent”?
Tell me how to find the position of the first occurrence of a substring in a string?
How to get the length of string?
What is $_session in php?
What are the correct and the most two common way to start and finish a PHP block of code?
How do I start a php session?
How we load all classes that placed in different directory in one php file , means how to do auto load classes.
What is mod_php?
What are magic methods?
What is str_replace()?
What are the string functions in php?
What are php expressions?
What are the variables in php?
What is form action php?