note 81873 added to function.imagefill
| From: | Cypog at osu1 dot php dot net | Date: | Mon, 17 Mar 2008 15:27:44 +0000 |
| Subject: | note 81873 added to function.imagefill | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-137136@lists.php.net to get a copy of this message | ||
imagefill can't deal with alpha colors, use imagefilledrectangle instead.
<?php
header("Content-Type: image/png");
$im = imagecreatefrompng("img/button.png");
if (empty($_GET['alpha']))
{$_GET['alpha'] = 10;}
$color = imagecolorallocatealpha($im, 255, 255, 255, $_GET['alpha']);
imagefillalpha($im, $color);
imagepng($im);
imagedestroy($im);
function ImageFillAlpha($image, $color)
{
imagefilledrectangle($image, 0, 0, imagesx($image), imagesy($image), $color);
}
?>
----
Server IP: 212.124.37.9
Probable Submitter: 84.150.29.234
----
Manual Page -- http://www.php.net/manual/en/function.imagefill.php
Edit -- https://master.php.net/note/edit/81873
Del: integrated -- https://master.php.net/note/delete/81873/integrated
Del: useless -- https://master.php.net/note/delete/81873/useless
Del: bad code -- https://master.php.net/note/delete/81873/bad+code
Del: spam -- https://master.php.net/note/delete/81873/spam
Del: non-english -- https://master.php.net/note/delete/81873/non-english
Del: in docs -- https://master.php.net/note/delete/81873/in+docs
Del: other reasons-- https://master.php.net/note/delete/81873
Reject -- https://master.php.net/note/reject/81873
Search -- https://master.php.net/manage/user-notes.php