note 102944 added to function.imagepng
| From: | codam at osu1 dot php dot net | Date: | Tue, 15 Mar 2011 18:03:02 +0000 |
| Subject: | note 102944 added to function.imagepng | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-177922@lists.php.net to get a copy of this message | ||
Creating a transparent image filled with tranparent color only
I had some hard times putting up this one:
// Set the image
$img = imagecreatetruecolor(100,100);
imagesavealpha($img, true);
// Fill the image with transparent color
$color = imagecolorallocatealpha($img,0x00,0x00,0x00,127);
imagefill($img, 0, 0, $color);
// Save the image to file.png
imagepng($img, "file.png");
// Destroy image
imagedestroy($img);
----
Server IP: 195.221.21.36
Probable Submitter: 217.195.18.153
----
Manual Page -- http://www.php.net/manual/en/function.imagepng.php
Edit -- https://master.php.net/note/edit/102944
Del: integrated -- https://master.php.net/note/delete/102944/integrated
Del: useless -- https://master.php.net/note/delete/102944/useless
Del: bad code -- https://master.php.net/note/delete/102944/bad+code
Del: spam -- https://master.php.net/note/delete/102944/spam
Del: non-english -- https://master.php.net/note/delete/102944/non-english
Del: in docs -- https://master.php.net/note/delete/102944/in+docs
Del: other reasons-- https://master.php.net/note/delete/102944
Reject -- https://master.php.net/note/reject/102944
Search -- https://master.php.net/manage/user-notes.php