summaryrefslogtreecommitdiffstats
path: root/modules/avatar
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-13 16:43:43 -0500
committerUnknwon <u@gogs.io>2015-11-13 16:43:43 -0500
commit1559bd58e7dee6927d31e1aaf1b6ebfc0ffd59dc (patch)
tree1051e333cd223539788306aa169899b8c332d69a /modules/avatar
parent6a664e88c77f1ddd9c5bff4898e21a8271a5da9a (diff)
downloadgitea-1559bd58e7dee6927d31e1aaf1b6ebfc0ffd59dc.tar.gz
gitea-1559bd58e7dee6927d31e1aaf1b6ebfc0ffd59dc.zip
save custom avatar as PNG
Diffstat (limited to 'modules/avatar')
-rw-r--r--modules/avatar/avatar.go4
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)
}