Commit 95a29bbb authored by 王源's avatar 王源 🎧

调整拼图文件名的组成

parent 128cd85a
......@@ -305,9 +305,10 @@ class Drawer
/**
* 拼图
* @param $imgPathList
* @param string $name
* @return bool|string
*/
public function mergeImages($imgPathList)
public function mergeImages($imgPathList, $name = '')
{
$maxW = $maxH = 0;
$filenameList = [];
......@@ -338,7 +339,7 @@ class Drawer
// 判断路径是否存在,不存在,则创建
mkdir($savePath, 0777, true);
}
$imgNewPath = $savePath . '/' . $filename . '.png';
$imgNewPath = $savePath . '/' . ($name ?: $filename) . '.png';
if (file_exists($imgNewPath)) {
return $imgNewPath;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment