From 2877d691431eacbcd7f3bb2f9c8b94486e8e4c3f Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Mon, 22 Jun 2015 15:17:47 -0400 Subject: [PATCH] use proper dimensions for generated profile image --- api/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/user.go b/api/user.go index d7312694bb..79d4bb32c4 100644 --- a/api/user.go +++ b/api/user.go @@ -603,7 +603,7 @@ func createProfileImage(username string, userId string) ([]byte, *model.AppError seed := h.Sum32() color := colors[int(seed)%len(colors)] - img := image.NewRGBA(image.Rect(0, 0, 640, 480)) + img := image.NewRGBA(image.Rect(0, 0, int(utils.Cfg.ImageSettings.ProfileWidth), int(utils.Cfg.ImageSettings.ProfileHeight))) draw.Draw(img, img.Bounds(), &image.Uniform{color}, image.ZP, draw.Src) buf := new(bytes.Buffer)