note 64160 rejected from function.imagecopyresampled by mazzanet
| From: | mazzanet@php.net | Date: | Sun, 09 Apr 2006 07:42:50 +0000 |
| Subject: | note 64160 rejected from function.imagecopyresampled by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-107586@lists.php.net to get a copy of this message | ||
Note Submitter: kazperua at hotmail dot com
----
<?
...
$t_im = imageCreateTrueColor($t_wd,$t_ht);
imageAntiAlias($t_im,true);
imagealphablending($t_im, false);
imagesavealpha($t_im,true);
$transparent = imagecolorallocatealpha($t_im, 255, 255, 255, 127);
imagefilledrectangle($t_img, 0, 0, $t_wd, $t_ht, $transparent);
imageCopyResampled($t_im, $o_im, 0, 0, 0, 0, $t_wd, $t_ht, $o_wd, $o_ht);
imagePNG($t_im, $image_name);
...
?>
-------
The above does NOT work to preserve transparency in a PNG image for me. The error is obviously in
imageCopyResample - the image created up to imagefilledrectangled have tested transparency to be
working, but as soon as it is resampled all transparency is lost. Can anyone give any pointers on
this?