note 49168 added to function.imagecolorallocate
| From: | php-general at lists dot php dot net | Date: | Tue, 18 Jan 2005 22:23:40 +0000 |
| Subject: | note 49168 added to function.imagecolorallocate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-83580@lists.php.net to get a copy of this message | ||
When you are using truecolor images, you can also use bitwise operations to generate the color:
<?php
$color = ($r << 16) | ($g << 8) | $b; // 2261213
?>
This is identical to the imagecolorallocate() function, in truecolor images!
----
Manual Page -- http://www.php.net/manual/en/function.imagecolorallocate.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+49168
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49168&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49168&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49168&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49168&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49168&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+49168&report=yes
Search -- http://master.php.net/manage/user-notes.php