记住用户名密码
public function addimgtobg($srcurl, $desurl)
{
//创建源图的实例
$src = imagecreatefromstring(file_get_contents($srcurl));
//创建png图的实例
$des = imagecreatefrompng($desurl);
//获取点图片的宽高
list($point_w, $point_h) = getimagesize($desurl);
//重点:png透明用这个函数
imagecopy($src, $des, 970, 1010, 0, 0, $point_w, $point_h);
imagecopy($src, $des, 930, 1310, 0, 0, $point_w, $point_h);
$filepath = date('Ymd') . DS . time() . '.jpg';
imagejpeg($src, 'uploads' . DS . $filepath);
imagedestroy($src);
imagedestroy($des);
return $filepath;
}
目前有 0 条留言 其中:访客:0 条, 博主:0 条