liujiandao
2023-11-10 4b15160f8821d9b4c223a817c2632ae1425be533
utils/image/image.go
@@ -44,7 +44,13 @@
         b = sz.Y
      }
      thumbnailImg = canvas.(*image.YCbCr).SubImage(image.Rect(l, t, r, b)).(*image.YCbCr)
      if ycbcr, ok := canvas.(*image.YCbCr); ok {
         thumbnailImg = ycbcr.SubImage(image.Rect(l, t, r, b)).(*image.YCbCr)
      } else if rgba, ok := canvas.(*image.RGBA); ok {
         thumbnailImg = rgba.SubImage(image.Rect(l, t, r, b)).(*image.RGBA)
      } else {
         return nil, errors.New("未识别的图片色彩类型")
      }
   } else {
      w := width
      h := height