...
|
...
|
@@ -152,10 +152,11 @@ class QRcode |
|
|
|
|
|
//获取覆盖图图片的宽高
|
|
|
list($src_w, $src_h) = getimagesize($src_path);
|
|
|
|
|
|
$a = getimagesize($dst_path);
|
|
|
$b = getimagesize($src_path);
|
|
|
|
|
|
//将覆盖图复制到目标图片上,最后个参数100是设置透明度(100是不透明),这里实现不透明效果
|
|
|
imagecopymerge($dst, $src, $x, $y, 0, 0, $src_w, $src_h, 90);
|
|
|
imagecopymerge($dst, $src,$a[0]-$b[0]-10, $a[1]-$b[1]-10, 0, 0, $src_w, $src_h, 90);
|
|
|
|
|
|
$this->outfile = $this->cache_dir.DS.time().'.png';
|
|
|
imagepng($dst, $this->outfile);//根据需要生成相应的图片
|
...
|
...
|
|