正在显示
1 个修改的文件
包含
1 行增加
和
2 行删除
@@ -115,12 +115,11 @@ func ResizeImage(fileType, sourcePath, prefix, subfix string, file *multipart.Fi | @@ -115,12 +115,11 @@ func ResizeImage(fileType, sourcePath, prefix, subfix string, file *multipart.Fi | ||
115 | return | 115 | return |
116 | } | 116 | } |
117 | Rectangle := image.Bounds() | 117 | Rectangle := image.Bounds() |
118 | - log.Debug(Rectangle.Dx(), Rectangle.Dy()) | ||
119 | image = imaging.Resize(image, Rectangle.Dx()/3, 0, imaging.Lanczos) | 118 | image = imaging.Resize(image, Rectangle.Dx()/3, 0, imaging.Lanczos) |
120 | err = imaging.Save(image, filename) | 119 | err = imaging.Save(image, filename) |
121 | if err != nil { | 120 | if err != nil { |
122 | log.Error(err) | 121 | log.Error(err) |
123 | } | 122 | } |
124 | - log.Debug(fmt.Sprintf("resize iamge:%v", filename)) | 123 | + log.Debug(fmt.Sprintf("resize iamge:%v w:%v h:%v file:%v kb", filename, Rectangle.Dx(), Rectangle.Dy(), file.Size/1024)) |
125 | return | 124 | return |
126 | } | 125 | } |
-
请 注册 或 登录 后发表评论