GD Transparency PNG
So I basically have this:
$img = imagecreatefrompng('assets/other/redcircle.png');
imagepng($img);
imagedestroy($img);
So the redcircle.png file has a transparency (with anti aliasing). Bu开发者_运维百科t GD just turns all the transparency in black? Is there a way to get back the original transparency?
You have to tell GD to save the alpha using imagesavealpha: http://www.php.net/manual/en/function.imagesavealpha.php
精彩评论