note 49166 added to function.imagecolorat
| From: | php-general at lists dot php dot net | Date: | Tue, 18 Jan 2005 22:08:33 +0000 |
| Subject: | note 49166 added to function.imagecolorat | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-83578@lists.php.net to get a copy of this message | ||
Optimal:
<?php
$rgb = imagecolorat($im, $x, $y);
$r = ($rgb >> 16);
$g = ($rgb >> 8) & 255;
$b = $rgb & 255;
?>
As you see, you can also use decimal values (faster).
----
Manual Page -- http://www.php.net/manual/en/function.imagecolorat.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49166
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49166&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49166&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49166&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49166&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49166&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49166&report=yes
Search -- http://master.php.net/manage/user-notes.php