note 35938 added to function.imagecolorallocatealpha
| From: | fchristl at hotmail dot com | Date: | Fri, 19 Sep 2003 16:55:46 +0000 |
| Subject: | note 35938 added to function.imagecolorallocatealpha | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-56780@lists.php.net to get a copy of this message | ||
Check out this Source, it's a little funny feature showing you, for what
imagecolorallocatealpha() is used:
<?php
$im=imagecreatetruecolor(300,300);
$white=imagecolorallocate($im,255,255,255);
imagefilledrectangle($im,0,0,imagesx($im),imagesy($im),$white);
for($i=0;$i<256;$i=$i+10)
{
$col=imagecolorallocatealpha($im,$i,$i,$i,ceil(rand(0,127)));
imagefilledellipse($im,$i,$i,$i,$i,$col);
}
header("content-type: image/png");
imagepng($im);
?>
----
Manual Page -- http://www.php.net/manual/en/function.imagecolorallocatealpha.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35938
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35938&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35938&report=yes