note 90364 added to function.imagecreatefrompng
| From: | admin at wdfa dot co dot uk | Date: | Fri, 17 Apr 2009 22:06:02 +0000 |
| Subject: | note 90364 added to function.imagecreatefrompng | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-153457@lists.php.net to get a copy of this message | ||
When using imagecreatepng with alpha blending you will lose the blending.
To over come this use something like the following
<?php
$dstimage=imagecreatetruecolor($width,$height);
$srcimage=imagecreatefrompng($src);
imagecopyresampled($dstimage,$srcimage,0,0,0,0, $width,$height,$width,$height);
?>
Where $width and $height are the width and height of the $src image.
This will create a true colour image then copy the png image to this true colour image and retain
alpha blending.
----
Server IP: 92.48.74.199
Probable Submitter: 82.43.225.89
----
Manual Page -- http://www.php.net/manual/en/function.imagecreatefrompng.php
Edit -- https://master.php.net/note/edit/90364
Del: integrated -- https://master.php.net/note/delete/90364/integrated
Del: useless -- https://master.php.net/note/delete/90364/useless
Del: bad code -- https://master.php.net/note/delete/90364/bad+code
Del: spam -- https://master.php.net/note/delete/90364/spam
Del: non-english -- https://master.php.net/note/delete/90364/non-english
Del: in docs -- https://master.php.net/note/delete/90364/in+docs
Del: other reasons-- https://master.php.net/note/delete/90364
Reject -- https://master.php.net/note/reject/90364
Search -- https://master.php.net/manage/user-notes.php