Feature/static image manager (#95)

* feat(static-image): Add static image manager with web interface

- Create StaticImageManager class with image scaling and transparency support
- Add configuration options for display duration, zoom scale, and background color
- Integrate with display controller and web interface
- Add image upload functionality to web interface
- Support for various image formats with proper scaling
- Efficient image processing with aspect ratio preservation
- Ready for future scrolling feature implementation

* fix(static-image): Move display duration to main display_durations block

- Remove display_duration from static_image config section
- Update StaticImageManager to read duration from display.display_durations.static_image
- Remove display duration field from web interface form
- Update web interface JavaScript to not include display_duration in payload
- Follows same pattern as all other managers in the project

* feat(static-image): Add fit to display option

- Add fit_to_display checkbox to automatically scale images to fit display
- When enabled, images are scaled to fit display dimensions while preserving aspect ratio
- When disabled, manual zoom_scale control is available
- Update web interface with smart form controls (zoom scale disabled when fit to display is on)
- Prevents stretching or cropping - images are always properly fitted
- Default to fit_to_display=true for better user experience

* refactor(static-image): Remove zoom_scale and simplify to fit_to_display only

- Remove zoom_scale option entirely as it was confusing and redundant
- Simplify image processing to always fit to display dimensions
- Remove zoom_scale field from web interface
- Clean up JavaScript to remove zoom scale logic
- Images are now always properly fitted without stretching or cropping
- Much simpler and more intuitive user experience
This commit is contained in:
Chuck
2025-10-05 10:46:36 -04:00
committed by GitHub
parent a115a1ed6b
commit f3d02e07ea
11 changed files with 600 additions and 15 deletions

View File

@@ -72,7 +72,8 @@
"ncaam_basketball_upcoming": 30,
"music": 30,
"of_the_day": 40,
"news_manager": 60
"news_manager": 60,
"static_image": 10
},
"use_short_date_format": true
},
@@ -130,7 +131,7 @@
"duration_buffer": 0.1
},
"odds_ticker": {
"enabled": false,
"enabled": true,
"show_favorite_teams_only": true,
"games_per_favorite_team": 1,
"max_games_per_league": 5,
@@ -233,8 +234,6 @@
"recent_games_to_show": 1,
"upcoming_games_to_show": 1,
"show_favorite_teams_only": true,
"show_all_live": false,
"show_shots_on_goal": false,
"favorite_teams": [
"TB"
],
@@ -301,7 +300,6 @@
"recent_games_to_show": 1,
"upcoming_games_to_show": 1,
"show_favorite_teams_only": true,
"show_all_live": false,
"favorite_teams": [
"TB",
"DAL"
@@ -334,11 +332,9 @@
"recent_games_to_show": 1,
"upcoming_games_to_show": 1,
"show_favorite_teams_only": true,
"show_all_live": false,
"favorite_teams": [
"UGA",
"AUB",
"AP_TOP_25"
"AUB"
],
"logo_dir": "assets/sports/ncaa_logos",
"show_records": true,
@@ -369,8 +365,6 @@
"recent_games_to_show": 1,
"upcoming_games_to_show": 1,
"show_favorite_teams_only": true,
"show_all_live": false,
"show_series_summary": false,
"favorite_teams": [
"UGA",
"AUB"
@@ -419,8 +413,6 @@
"recent_games_to_show": 1,
"upcoming_games_to_show": 1,
"show_favorite_teams_only": true,
"show_all_live": false,
"show_shots_on_goal": false,
"favorite_teams": [
"RIT"
],
@@ -452,8 +444,6 @@
"recent_games_to_show": 1,
"upcoming_games_to_show": 1,
"show_favorite_teams_only": true,
"show_all_live": false,
"show_series_summary": false,
"favorite_teams": [
"TB",
"TEX"
@@ -611,5 +601,16 @@
0,
0
]
},
"static_image": {
"enabled": false,
"image_path": "assets/static_images/default.png",
"fit_to_display": true,
"preserve_aspect_ratio": true,
"background_color": [
0,
0,
0
]
}
}