作者 yangfu

上传修改

@@ -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 }