Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How can MYSQL functions be available with PHP?

945


What is encapsulation in php?

933


Does php support inheritance?

877


How do you clear environment variables?

876


Which function would you use to read a line of data from a file in php?

973


How to convert numbers to strings in php?

947


How come the code works, but does not for two-dimensional array of mine?

917


What is the array in php?

951


Is php object oriented?

867


What are the advantages and disadvantages of cascade style sheets?

1068


How to pass variables by references?

941


What is php date function?

1026


What are the disadvantages of php?

916


Can you use php and javascript together?

970


Is it easy to learn wordpress?

920