How can I find the colour of a pixel of an image?
Answer Posted / jude jeevanraj.p
This is easily done through using the imagecolorat function.
You must pass as parameters the image resource, and the x
and y co-ordinates you want to find the color of, for
instance:
$rgb = imagecolorat($im, 5, 10);
Will get a reference to the colour used at 5,10 (X,Y) on
the image.
Depending on the version of the GD library you are using
and the type of image, you may experience different return
values
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is php in simple words?
What is the purpose of php?
What type of headers that PHP supports?
What is a php session?
What is final class and final method?
How do you call a constructor for a parent class?
Is nan in php?
What is empty () in php?
What is use of mysqli_query in php?
How you can update memcached when you make changes to php?
What library is used for pdf in php?
Explain me what is the difference between explode() and split() functions?
What is php data type?
Can php variables have numbers?
How to send a cookie to the browser?