压缩头像

This commit is contained in:
Minho
2017-05-13 14:43:03 +08:00
parent d3427ba2a7
commit d02768aad0
3 changed files with 22 additions and 20 deletions

View File

@@ -132,8 +132,8 @@ func (c *SettingController) Upload() {
logs.Error("ImageCopyFromFile => ",err)
c.JsonResult(6001,"头像剪切失败")
}
err = graphics.SaveImage(filePath,subImg)
err = graphics.ImageResizeSaveFile(subImg,120,120,filePath)
//err = graphics.SaveImage(filePath,subImg)
if err != nil {
logs.Error("保存文件失败 => ",err.Error())