note 46142 added to function.imagecolortransparent
| From: | emilusatgaleria-mdotartdotpl at osu1 dot php dot net | Date: | Thu, 30 Sep 2004 21:02:52 +0000 |
| Subject: | note 46142 added to function.imagecolortransparent | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-77628@lists.php.net to get a copy of this message | ||
To resize or copy image (gif [with gd>=2.0.28] or png) with transparency.
-Take current transparency color
-create a new image with palette like old one and fill new image with transparent color
-set transparent color
-copy resized image
$colorTransparent = imagecolortransparent($im);
$im2 = imagecreate($new_w,$new_h);
imagepalettecopy($im2,$im);
imagefill($im2,0,0,$colorTransparent);
imagecolortransparent($im2, $colorTransparent);
imagecopyresized($im2,$im,0,0,0,0,$new_w,$new_h,$imsx,$imsy);
----
Manual Page -- http://www.php.net/manual/en/function.imagecolortransparent.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46142
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46142&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46142&report=yes
Search -- http://master.php.net/manage/user-notes.php