...
|
...
|
@@ -115,12 +115,11 @@ func ResizeImage(fileType, sourcePath, prefix, subfix string, file *multipart.Fi |
|
|
return
|
|
|
}
|
|
|
Rectangle := image.Bounds()
|
|
|
log.Debug(Rectangle.Dx(), Rectangle.Dy())
|
|
|
image = imaging.Resize(image, Rectangle.Dx()/3, 0, imaging.Lanczos)
|
|
|
err = imaging.Save(image, filename)
|
|
|
if err != nil {
|
|
|
log.Error(err)
|
|
|
}
|
|
|
log.Debug(fmt.Sprintf("resize iamge:%v", filename))
|
|
|
log.Debug(fmt.Sprintf("resize iamge:%v w:%v h:%v file:%v kb", filename, Rectangle.Dx(), Rectangle.Dy(), file.Size/1024))
|
|
|
return
|
|
|
} |
...
|
...
|
|