嘿,當我創建一個縮略圖,嘗試在png上保持透明度時遇到一些麻煩,任何人有任何這方面的經驗?任何幫助將是巨大的,這裏是我目前在做什麼:PNG透明度與PHP
$fileName= "../js/ajaxupload/tees/".$fileName;
list($width, $height) = getimagesize($fileName);
$newwidth = 257;
$newheight = 197;
$thumb = imagecreatetruecolor($newwidth, $newheight);
imagealphablending($thumb, true);
$source = imagecreatefrompng($fileName);
imagealphablending($source, true);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
imagesavealpha($thumb, true);
imagepng($thumb,$newFilename);
破解它!多謝! – BastardPrince 2008-11-23 23:59:57
這對我不起作用:( – 2by 2011-10-11 16:30:35