style(代码风格): 优化代码风格
build.yaml / build (push) Successful in 36s

This commit is contained in:
2026-07-13 16:20:01 +08:00
parent 1004781aed
commit 4e651619f8
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ import (
"image/color"
"github.com/tdewolff/canvas"
canvas_image "github.com/tdewolff/canvas/image"
canvasimage "github.com/tdewolff/canvas/image"
)
// renderImage 渲染图片
@@ -113,7 +113,7 @@ func imageWithTransparentEdge(img image.Image) (image.Image, int) {
if w == 0 || h == 0 {
return img, 0
}
if src, ok := img.(*canvas_image.Image); ok && src.Mimetype == "image/jpeg" && src.Mask == nil {
if src, ok := img.(*canvasimage.Image); ok && src.Mimetype == "image/jpeg" && src.Mask == nil {
return img, 0
}
if opaque, ok := img.(interface{ Opaque() bool }); ok && opaque.Opaque() {