作者 王晓刚
1 个管道 的构建 通过 耗费 0 秒

我的分享

... ... @@ -84,7 +84,7 @@ class Share extends WechatBase
}
//圆形的头像
$image = \think\Image::open(ROOT_PATH."public/white.png");
$image->water($avatar_url,[311,46],100)
$image->water($avatar_url,[311,46.5],100)
->water(ROOT_PATH."public/bg$type.png")
->water($url,[300,500],100)
->save($savePath."poster_$user[id].png");
... ... @@ -126,7 +126,7 @@ class Share extends WechatBase
if (file_put_contents($new_file, base64_decode(str_replace($result[1], '', $img_content)))) {
//等比放大缩小二维码
$image = \think\Image::open($save_path);
$image->thumb(65, 68,\think\Image::THUMB_SCALING)->save($save_path);
$image->thumb(65, 65,\think\Image::THUMB_SCALING)->save($save_path);
return ['code'=>0,'file_path'=>$new_file,'save_path'=>$save_path];
}else{
return ['code'=>1,'msg'=>'图片保存失败'];
... ...