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