|
发表于 2011-7-27 10:23:02
|
显示全部楼层
$dst_img = $create($this->width, $this->height);
//ryan add 20110727 10:17 处理透明背景图问题
$transparent = imagecolortransparent($src_img, imagecolorallocate($src_img, 0, 0, 0));
if ($transparent >= 0) {
imagecolortransparent($dst_img, $transparent);
imagealphablending($dst_img, false); //取消混杂模式
imagesavealpha($dst_img, true); //保留原有通道
}
//处理透明背景结束
$copy($dst_img, $src_img, 0, 0, $this->x_axis, $this->y_axis, $this->width, $this->height, $this->orig_width, $this->orig_height);
该方法处理后,图像周边会有个黑线,还在找办法处理 |
|