Fix NHL logo transparency handling - Use logo as mask when pasting to properly handle transparency - Match the approach used in weather icons

This commit is contained in:
ChuckBuilds
2025-04-18 10:26:09 -05:00
parent dea69febd8
commit 084e283c04

View File

@@ -1215,12 +1215,12 @@ class NHLScoreboardManager:
if home_logo: if home_logo:
home_x = width // 4 - home_logo.width // 2 home_x = width // 4 - home_logo.width // 2
home_y = height // 4 - home_logo.height // 2 home_y = height // 4 - home_logo.height // 2
draw.im.paste(home_logo, (home_x, home_y)) draw.im.paste(home_logo, (home_x, home_y), home_logo)
if away_logo: if away_logo:
away_x = width // 4 - away_logo.width // 2 away_x = width // 4 - away_logo.width // 2
away_y = 3 * height // 4 - away_logo.height // 2 away_y = 3 * height // 4 - away_logo.height // 2
draw.im.paste(away_logo, (away_x, away_y)) draw.im.paste(away_logo, (away_x, away_y), away_logo)
# Draw scores # Draw scores
score_color = (255, 255, 255) score_color = (255, 255, 255)