alpha png to gif with transparent
| From: | Exiang | Date: | Mon, 29 Nov 2004 03:03:28 +0000 |
| Subject: | alpha png to gif with transparent | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-25053@lists.php.net to get a copy of this message | ||
IT seem to be impossible as the alpha png is 24 bit and gif can only be 256 color..
however, is there any alternative which at least make the generated transparent gif look good?
this is my code.. but itdin work
<?php
$img1 = imagecreatefrompng('logommu.png');
$back = imagecolorallocate($img1, 255, 255, 255);
imagecolortransparent($img1, $back);
imagetruecolortopalette($img1, true, 255);
header("Content-type: image/gif");
imagegif($img1);
?>