mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
fix(nhl): Add .load() before alpha_composite for compatibility
This commit is contained in:
@@ -337,6 +337,10 @@ def create_scorebug_image(game_details):
|
||||
# Create RGBA background region
|
||||
bg_region_rgba = img.crop(box).convert("RGBA")
|
||||
|
||||
# Ensure images are loaded before compositing (for compatibility)
|
||||
bg_region_rgba.load()
|
||||
away_logo_rgba.load()
|
||||
|
||||
# Alpha composite logo onto background region
|
||||
composite_region = Image.alpha_composite(bg_region_rgba, away_logo_rgba)
|
||||
|
||||
@@ -369,6 +373,10 @@ def create_scorebug_image(game_details):
|
||||
# Create RGBA background region
|
||||
bg_region_rgba = img.crop(box).convert("RGBA")
|
||||
|
||||
# Ensure images are loaded before compositing (for compatibility)
|
||||
bg_region_rgba.load()
|
||||
home_logo_rgba.load()
|
||||
|
||||
# Alpha composite logo onto background region
|
||||
composite_region = Image.alpha_composite(bg_region_rgba, home_logo_rgba)
|
||||
|
||||
@@ -1098,6 +1106,10 @@ class NHLScoreboardManager:
|
||||
# Create RGBA background region
|
||||
bg_region_rgba = img.crop(box).convert("RGBA")
|
||||
|
||||
# Ensure images are loaded before compositing (for compatibility)
|
||||
bg_region_rgba.load()
|
||||
away_logo_rgba.load()
|
||||
|
||||
# Alpha composite logo onto background region
|
||||
composite_region = Image.alpha_composite(bg_region_rgba, away_logo_rgba)
|
||||
|
||||
@@ -1126,6 +1138,10 @@ class NHLScoreboardManager:
|
||||
# Create RGBA background region
|
||||
bg_region_rgba = img.crop(box).convert("RGBA")
|
||||
|
||||
# Ensure images are loaded before compositing (for compatibility)
|
||||
bg_region_rgba.load()
|
||||
home_logo_rgba.load()
|
||||
|
||||
# Alpha composite logo onto background region
|
||||
composite_region = Image.alpha_composite(bg_region_rgba, home_logo_rgba)
|
||||
|
||||
@@ -1215,6 +1231,10 @@ class NHLScoreboardManager:
|
||||
# Create RGBA background region
|
||||
bg_region_rgba = img.crop(box).convert("RGBA")
|
||||
|
||||
# Ensure images are loaded before compositing (for compatibility)
|
||||
bg_region_rgba.load()
|
||||
away_logo_rgba.load()
|
||||
|
||||
# Alpha composite logo onto background region
|
||||
composite_region = Image.alpha_composite(bg_region_rgba, away_logo_rgba)
|
||||
|
||||
@@ -1248,6 +1268,10 @@ class NHLScoreboardManager:
|
||||
# Create RGBA background region
|
||||
bg_region_rgba = img.crop(box).convert("RGBA")
|
||||
|
||||
# Ensure images are loaded before compositing (for compatibility)
|
||||
bg_region_rgba.load()
|
||||
home_logo_rgba.load()
|
||||
|
||||
# Alpha composite logo onto background region
|
||||
composite_region = Image.alpha_composite(bg_region_rgba, home_logo_rgba)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user