PLT-6277 Moved profile image cropping to server (#6269)
* PLT-6277 Moved profile image cropping to server * Cosmetic refactoring of SettingPicture component
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
b509f65b8e
Коммит
1c8fdb4cdd
@@ -805,7 +805,7 @@ func SetProfileImage(userId string, imageData *multipart.FileHeader) *model.AppE
|
||||
}
|
||||
|
||||
// Scale profile image
|
||||
img = imaging.Resize(img, utils.Cfg.FileSettings.ProfileWidth, utils.Cfg.FileSettings.ProfileHeight, imaging.Lanczos)
|
||||
img = imaging.Fill(img, utils.Cfg.FileSettings.ProfileWidth, utils.Cfg.FileSettings.ProfileHeight, imaging.Center, imaging.Lanczos)
|
||||
|
||||
buf := new(bytes.Buffer)
|
||||
err = png.Encode(buf, img)
|
||||
|
||||
Ссылка в новой задаче
Block a user