This commit is contained in:
laodaming 2023-06-13 19:38:32 +08:00
parent dc41f400a1
commit f1d20d061c

View File

@ -34,7 +34,10 @@ func CreateQrCodeBs64WithLogo(content, outPath string, logoPath string, size, x,
_ = png.Encode(buf, outImg)
if outPath != "" {
// 写入文件
f, _ := os.Create(outPath)
f, err := os.Create(outPath)
if err != nil {
return "", err
}
defer f.Close()
err = png.Encode(f, outImg)
if err != nil {