diff options
author | Unknwon <u@gogs.io> | 2015-11-13 16:43:43 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-11-13 16:43:43 -0500 |
commit | 1559bd58e7dee6927d31e1aaf1b6ebfc0ffd59dc (patch) | |
tree | 1051e333cd223539788306aa169899b8c332d69a /modules/avatar | |
parent | 6a664e88c77f1ddd9c5bff4898e21a8271a5da9a (diff) | |
download | gitea-1559bd58e7dee6927d31e1aaf1b6ebfc0ffd59dc.tar.gz gitea-1559bd58e7dee6927d31e1aaf1b6ebfc0ffd59dc.zip |
save custom avatar as PNG
Diffstat (limited to 'modules/avatar')
-rw-r--r-- | modules/avatar/avatar.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/avatar/avatar.go b/modules/avatar/avatar.go index e037703ba6..60f7e2ecb7 100644 --- a/modules/avatar/avatar.go +++ b/modules/avatar/avatar.go @@ -39,6 +39,8 @@ import ( "github.com/gogits/gogs/modules/setting" ) +//FIXME: remove cache module + var gravatarSource string func UpdateGravatarSource() { @@ -153,7 +155,7 @@ func (this *Avatar) Encode(wr io.Writer, size int) (err error) { if img, err = decodeImageFile(imgPath); err != nil { return } - m := resize.Resize(uint(size), 0, img, resize.NearestNeighbor) + m := resize.Resize(uint(size), 0, img, resize.Lanczos3) return jpeg.Encode(wr, m, nil) } |