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
38 lines
1.3 KiB
Markdown
38 lines
1.3 KiB
Markdown
# Build Size Reduction
|
|
|
|
## Phase 1: Quick Wins (build scripts)
|
|
|
|
- [x] Strip unused NumPy submodules (polynomial, linalg, ma, lib, distutils)
|
|
- [x] Strip debug symbols from .pyd/.dll/.so files
|
|
- [x] Remove zeroconf service database
|
|
- [x] Remove .py source from site-packages after compiling to .pyc
|
|
- [x] Strip unused PIL image plugins (keep JPEG/PNG/ICO/BMP for tray)
|
|
|
|
## Phase 2: Replace Pillow with cv2
|
|
|
|
- [x] Create `utils/image_codec.py` with cv2-based image helpers
|
|
- [x] Replace PIL in `_preview_helpers.py`
|
|
- [x] Replace PIL in `picture_sources.py`
|
|
- [x] Replace PIL in `color_strip_sources.py`
|
|
- [x] Replace PIL in `templates.py`
|
|
- [x] Replace PIL in `postprocessing.py`
|
|
- [x] Replace PIL in `output_targets_keycolors.py`
|
|
- [x] Replace PIL in `kc_target_processor.py`
|
|
- [x] Replace PIL in `pixelate.py` filter
|
|
- [x] Replace PIL in `downscaler.py` filter
|
|
- [x] Replace PIL in `scrcpy_engine.py`
|
|
- [x] Replace PIL in `live_stream_manager.py`
|
|
- [x] Move Pillow from core deps to [tray] optional in pyproject.toml
|
|
- [x] Make PIL import conditional in `tray.py`
|
|
- [x] Move opencv-python-headless to core dependencies
|
|
|
|
## Phase 4: OpenCV stripping (build scripts)
|
|
|
|
- [x] Strip ffmpeg DLL, Haar cascades, dev files (already existed)
|
|
- [x] Strip typing stubs (already existed)
|
|
|
|
## Verification
|
|
|
|
- [x] Lint: `ruff check src/ tests/ --fix`
|
|
- [x] Tests: 341 passed
|