开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜