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
Is php session id unique?
When should you use a stored procedure?
What are regular expressions in programming?
armstrong number by using php while number is given by the keyboard.?
What is php trait?
How can we submit form without a submit button?
List types of array are available in php?
Is php an object or array?
What is the use of addslashes in php?
How many types of arrays are there in php?
How to enable cURL in PHP?
How to download and install php for windows?
what is mean by portal
How do I escape data before storing it into the database?
Why session is required?