From ced6029dd8bfaa908541dbd957ed4bb3e683ac0f Mon Sep 17 00:00:00 2001 From: Alicia Date: Sat, 23 Feb 2019 14:31:14 +0000 Subject: [PATCH] change backgrounds to png for animation --- profbackground.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/profbackground.go b/profbackground.go index 0796c92..5588f8d 100644 --- a/profbackground.go +++ b/profbackground.go @@ -48,7 +48,7 @@ func profBackground(c *gin.Context) { return } img = resize.Thumbnail(2496, 1404, img, resize.Bilinear) - f, err := os.Create(fmt.Sprintf("static/profbackgrounds/%d.jpg", ctx.User.ID)) + f, err := os.Create(fmt.Sprintf("static/profbackgrounds/%d.png", ctx.User.ID)) defer f.Close() if err != nil { m = errorMessage{T(c, "An error occurred.")} @@ -63,7 +63,7 @@ func profBackground(c *gin.Context) { c.Error(err) return } - saveProfileBackground(ctx, 1, fmt.Sprintf("%d.jpg?%d", ctx.User.ID, time.Now().Unix())) + saveProfileBackground(ctx, 1, fmt.Sprintf("%d.png?%d", ctx.User.ID, time.Now().Unix())) case "2": // solid colour col := strings.ToLower(c.PostForm("value"))