diff options
author | Dennis Chen <barracks510@gmail.com> | 2016-07-21 02:31:14 -0500 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2016-07-21 15:31:14 +0800 |
commit | 6488ee12be3c8112d30bb490189618261886088e (patch) | |
tree | 7d1e7abf716890c327ed4f780dc4a241439a5e4a /modules/avatar | |
parent | c2fb01a257cfcddf5dc279fcd66175280778f7a9 (diff) | |
download | gitea-6488ee12be3c8112d30bb490189618261886088e.tar.gz gitea-6488ee12be3c8112d30bb490189618261886088e.zip |
avatar: make custom and generated avatars equal (#3301)
Sets all avatars to use PNG image format.
Keeps avatars consistent at 290x290px resolution.
Signed-off-by: Dennis Chen <barracks510@gmail.com>
Diffstat (limited to 'modules/avatar')
-rw-r--r-- | modules/avatar/avatar.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/avatar/avatar.go b/modules/avatar/avatar.go index e9d0c1282e..a8c3826d15 100644 --- a/modules/avatar/avatar.go +++ b/modules/avatar/avatar.go @@ -14,7 +14,7 @@ import ( "github.com/issue9/identicon" ) -const _RANDOM_AVATAR_SIZE = 200 +const AVATAR_SIZE = 290 // RandomImage generates and returns a random avatar image unique to input data // in custom size (height and width). @@ -39,5 +39,5 @@ func RandomImageSize(size int, data []byte) (image.Image, error) { // RandomImage generates and returns a random avatar image unique to input data // in default size (height and width). func RandomImage(data []byte) (image.Image, error) { - return RandomImageSize(_RANDOM_AVATAR_SIZE, data) + return RandomImageSize(AVATAR_SIZE, data) } |