change backgrounds to png for animation

This commit is contained in:
Alicia 2019-02-23 14:31:14 +00:00
parent edd0634904
commit ced6029dd8
1 changed files with 2 additions and 2 deletions

View File

@ -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"))