All checks were successful
Build Release / create-release (push) Successful in 1s
Build Release / build-docker (push) Successful in 42s
Lint & Test / test (push) Successful in 2m50s
Build Release / build-windows (push) Successful in 3m27s
Build Release / build-linux (push) Successful in 1m59s
- Create utils/image_codec.py with cv2-based image helpers - Replace PIL usage across all routes, filters, and engines with cv2 - Move Pillow from core deps to [tray] optional in pyproject.toml - Extract shared build logic into build-common.sh (detect_version, cleanup, etc.) - Strip unused NumPy/PIL/zeroconf/debug files in build scripts
1.3 KiB
1.3 KiB
Build Size Reduction
Phase 1: Quick Wins (build scripts)
- Strip unused NumPy submodules (polynomial, linalg, ma, lib, distutils)
- Strip debug symbols from .pyd/.dll/.so files
- Remove zeroconf service database
- Remove .py source from site-packages after compiling to .pyc
- Strip unused PIL image plugins (keep JPEG/PNG/ICO/BMP for tray)
Phase 2: Replace Pillow with cv2
- Create
utils/image_codec.pywith cv2-based image helpers - Replace PIL in
_preview_helpers.py - Replace PIL in
picture_sources.py - Replace PIL in
color_strip_sources.py - Replace PIL in
templates.py - Replace PIL in
postprocessing.py - Replace PIL in
output_targets_keycolors.py - Replace PIL in
kc_target_processor.py - Replace PIL in
pixelate.pyfilter - Replace PIL in
downscaler.pyfilter - Replace PIL in
scrcpy_engine.py - Replace PIL in
live_stream_manager.py - Move Pillow from core deps to [tray] optional in pyproject.toml
- Make PIL import conditional in
tray.py - Move opencv-python-headless to core dependencies
Phase 4: OpenCV stripping (build scripts)
- Strip ffmpeg DLL, Haar cascades, dev files (already existed)
- Strip typing stubs (already existed)
Verification
- Lint:
ruff check src/ tests/ --fix - Tests: 341 passed