fix
This commit is contained in:
parent
dc41f400a1
commit
f1d20d061c
@ -34,7 +34,10 @@ func CreateQrCodeBs64WithLogo(content, outPath string, logoPath string, size, x,
|
|||||||
_ = png.Encode(buf, outImg)
|
_ = png.Encode(buf, outImg)
|
||||||
if outPath != "" {
|
if outPath != "" {
|
||||||
// 写入文件
|
// 写入文件
|
||||||
f, _ := os.Create(outPath)
|
f, err := os.Create(outPath)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
err = png.Encode(f, outImg)
|
err = png.Encode(f, outImg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user