change backgrounds to png for animation

This commit is contained in:
Alicia 2019-02-23 14:31:14 +00:00
parent edd0634904
commit ced6029dd8

View File

@ -48,7 +48,7 @@ func profBackground(c *gin.Context) {
return return
} }
img = resize.Thumbnail(2496, 1404, img, resize.Bilinear) 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() defer f.Close()
if err != nil { if err != nil {
m = errorMessage{T(c, "An error occurred.")} m = errorMessage{T(c, "An error occurred.")}
@ -63,7 +63,7 @@ func profBackground(c *gin.Context) {
c.Error(err) c.Error(err)
return 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": case "2":
// solid colour // solid colour
col := strings.ToLower(c.PostForm("value")) col := strings.ToLower(c.PostForm("value"))