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 array function in javascript?
What is uri routing?
Do you know what is the function func_num_args() used for?
A process is identified by a unique___
What are the benefits of using php?
What is the difference between get and post method in php?
What is the difference between client-side and server-side programming?
What PHP stands for?
what does this symbol mean in php?
What is full form of php? Who is the father or inventor of php?
What is factory pattern in php?
What does type casting mean in php? Explain with an example?
List types of array are available in php?
How do I sort numbers in php?
how to track no of users logged in?