diff --git a/pkg/logic/upload.go b/pkg/logic/upload.go index ce37e9e..d2cd227 100644 --- a/pkg/logic/upload.go +++ b/pkg/logic/upload.go @@ -48,19 +48,6 @@ func ReadOrientation(filename string) (direct int, err error) { return } -// 旋转90度 -func Rotate90(m image.Image) image.Image { - rotate90 := image.NewRGBA(image.Rect(0, 0, m.Bounds().Dy(), m.Bounds().Dx())) - // 矩阵旋转 - for x := m.Bounds().Min.Y; x < m.Bounds().Max.Y; x++ { - for y := m.Bounds().Max.X - 1; y >= m.Bounds().Min.X; y-- { - // 设置像素点 - rotate90.Set(m.Bounds().Max.Y-x, y, m.At(y, x)) - } - } - return rotate90 -} - // 旋转90度 func rotate90(m image.Image) image.Image { rotate90 := image.NewRGBA(image.Rect(0, 0, m.Bounds().Dy(), m.Bounds().Dx()))