note 84969 added to function.imagecolorsforindex
| From: | matrebatre at osu1 dot php dot net | Date: | Thu, 07 Aug 2008 18:11:17 +0000 |
| Subject: | note 84969 added to function.imagecolorsforindex | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-143284@lists.php.net to get a copy of this message | ||
Be aware that
<?php
$rgba = imagecolorat($image, $x, $y);
$r = ($rgba >> 16) & 0xFF;
$g = ($rgba >> 8) & 0xFF;
$b = $rgba & 0xFF;
$a = ($rgba & 0x7F000000) >> 24;
?>
will only work for truecolor images. With eg GIF images, this will have strange results. For GIF
images, you should always use imagecolorsforindex().
----
Server IP: 195.207.10.20
Probable Submitter: 81.241.188.183
----
Manual Page -- http://www.php.net/manual/en/function.imagecolorsforindex.php
Edit -- https://master.php.net/note/edit/84969
Del: integrated -- https://master.php.net/note/delete/84969/integrated
Del: useless -- https://master.php.net/note/delete/84969/useless
Del: bad code -- https://master.php.net/note/delete/84969/bad+code
Del: spam -- https://master.php.net/note/delete/84969/spam
Del: non-english -- https://master.php.net/note/delete/84969/non-english
Del: in docs -- https://master.php.net/note/delete/84969/in+docs
Del: other reasons-- https://master.php.net/note/delete/84969
Reject -- https://master.php.net/note/reject/84969
Search -- https://master.php.net/manage/user-notes.php