note 72237 added to function.imagepng
| From: | alex at gateway-productions dot com | Date: | Mon, 08 Jan 2007 23:17:29 +0000 |
| Subject: | note 72237 added to function.imagepng | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-121471@lists.php.net to get a copy of this message | ||
barts code below does not work at least with gd 2
Only returns a blank image with alpha not the source resized
$im = ImageCreateFromPNG($sourcefile);
$im_dest = imagecreatetruecolor ($forcedwidth, $forcedheight);
imagealphablending($im_dest, false);
imagecopyresampled($im_dest, $im, 0, 0, 0, 0, $wm_width, $wm_height, $forcedwidth, $forcedheight);
imagesavealpha($im_dest, true);
imagepng($im_dest, $destfile);
imagedestroy($img_dest);
ps you also forgot image destroy and you had a random var in imagepng undefined in your post
----
Server IP: 66.163.161.117
Probable Submitter: 76.19.3.137
----
Manual Page -- http://www.php.net/manual/en/function.imagepng.php
Edit -- https://master.php.net/note/edit/72237
Del: integrated -- https://master.php.net/note/delete/72237/integrated
Del: useless -- https://master.php.net/note/delete/72237/useless
Del: bad code -- https://master.php.net/note/delete/72237/bad+code
Del: spam -- https://master.php.net/note/delete/72237/spam
Del: non-english -- https://master.php.net/note/delete/72237/non-english
Del: in docs -- https://master.php.net/note/delete/72237/in+docs
Del: other reasons-- https://master.php.net/note/delete/72237
Reject -- https://master.php.net/note/reject/72237
Search -- https://master.php.net/manage/user-notes.php