Skip to content

Commit

Permalink
using fill
Browse files Browse the repository at this point in the history
  • Loading branch information
Cufee committed Jan 19, 2025
1 parent 2a25fe6 commit baf504f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/stats/render/period/v2/cards.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func generateCards(stats fetch.AccountStatsOverPeriod, cards period.Cards, _ []m
// resize and place background
if opts.Background != nil {
cardsFrameSize := cardsFrame.Dimensions()
opts.Background = imaging.Resize(opts.Background, cardsFrameSize.Width, cardsFrameSize.Height, imaging.Lanczos)
opts.Background = imaging.Fill(opts.Background, cardsFrameSize.Width, cardsFrameSize.Height, imaging.Lanczos)
if !opts.BackgroundIsCustom {
seed, _ := strconv.Atoi(stats.Account.ID)
opts.Background = addBackgroundBranding(opts.Background, stats.RegularBattles.Vehicles, seed)
Expand Down
4 changes: 2 additions & 2 deletions render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (
_ "github.com/joho/godotenv/autoload"
)

var bgImage = "static://test_user_background"
var bgIsCustom = true
var bgImage = "static://bg-default"
var bgIsCustom = false

func init() {
loadStaticAssets(static)
Expand Down

0 comments on commit baf504f

Please sign in to comment.