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
How can MYSQL functions be available with PHP?
What is encapsulation in php?
Does php support inheritance?
How do you clear environment variables?
Which function would you use to read a line of data from a file in php?
How to convert numbers to strings in php?
How come the code works, but does not for two-dimensional array of mine?
What is the array in php?
Is php object oriented?
What are the advantages and disadvantages of cascade style sheets?
How to pass variables by references?
What is php date function?
What are the disadvantages of php?
Can you use php and javascript together?
Is it easy to learn wordpress?