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 / laxmikant

<?php
$im = imagecreatefrompng("php.png");
$rgb = imagecolorat($im, 10, 15);
$r = ($rgb >> 16) & 0xFF;
$g = ($rgb >> 8) & 0xFF;
$b = $rgb & 0xFF;

var_dump($r, $g, $b);
?>

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain preg_Match and preg_replace?

928


Which methods should be used for sending an email using the variables $to, $subject, and $body?

1043


What is a php web application?

964


Why session is required?

887


How many escape sequences are recognized in double-quoted strings in php?

934


How does php work?

929


How to create a directory?

971


How do you call a constructor for a parent class?

845


What are include() and require() functions?

901


Which framework is best for php?

916


what is the use of include_once in php?

999


What distinguishes php from something like client side java script?

984


How can I find my php version?

954


Tell me when a conditional statement is ended with an endif?

859


Which method removes the last element from the end of an array?

905