
裁剪LOGO出来的是这样的……
网上找到的代码是这样的:
imagesavealpha($this->_img,true);
$thumb = imagecreatetruecolor($this->_width,$this->_height);
imagealphablending($thumb,false);
imagesavealpha($thumb,true);
if(imagecopyresampled($thumb,$this->_img,0,0,0,0,300,300,300,300)){
$ret=imagepng($thumb,$fname);
}但是没有效果。