1
所以我基本上有这样的:GD透明PNG
$img = imagecreatefrompng('assets/other/redcircle.png');
imagepng($img);
imagedestroy($img);
所以redcircle.png文件具有透明性(与抗锯齿)。但GD只是变成了黑色的所有透明度?有没有办法找回原始透明度?
所以我基本上有这样的:GD透明PNG
$img = imagecreatefrompng('assets/other/redcircle.png');
imagepng($img);
imagedestroy($img);
所以redcircle.png文件具有透明性(与抗锯齿)。但GD只是变成了黑色的所有透明度?有没有办法找回原始透明度?
你必须告诉GD保存阿尔法使用imagesavealpha:http://www.php.net/manual/en/function.imagesavealpha.php
啊这是伟大的,谢谢我的朋友。 – Q2Ftb3k 2010-09-14 01:37:49