Code: Select all
$rgb = imagecolorat($im, $x, $y);
$r = ($rgb >> 16);
$g = ($rgb >> & 255;
$b = $rgb & 255;Thanks
Moderator: General Moderators
Code: Select all
$rgb = imagecolorat($im, $x, $y);
$r = ($rgb >> 16);
$g = ($rgb >> & 255;
$b = $rgb & 255;Basically, imagecolorat returns a really big number.. what these operators do is get parts of that number..rubberjohn wrote:ah ok so why are they needed in this function?
Sorry if these are obvious questions.