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
Are react hooks stable?
Does cors prevent csrf?
What are the __construct() and __destruct() methods in a php class?
How can you propagate a session id?
Where is session value stored php?
Explain object-oriented methodology in php?
Can we embedded directly PHP code into XHTML document? State Whether True or False?
What is the use of Mbstring?
Explain the difference between array_merge() and array_combine()?
How do you put a space in html?
How many types of array supported in php?
What type of operation is needed when passing values through a form or an url?
sort term descripttion form, report and uery
Can you explain, when to use if-else if-else over switch statements?
Tell me how can we check the value of a given variable is alphanumeric?