PySide6 desktop application for previewing sprite sheets, extracting frames, splitting animations into segments, and exporting assets.
sprite_viewer.py # Main window and app wiring
config.py # Centralized configuration
ui/ # Widgets and presentation
core/ # Controllers/workflow orchestration
managers/ # Settings, recent files, segment persistence
coordinators/ # Signal wiring between components
sprite_model/ # Frame extraction and image-processing logic
export/ # Export engine and dialogs
tests/ # Unit/integration/UI/performance-marked tests
spritetests/ # Sample sprite sheets used by tests/manual checks
ui/:sprite_canvas.py,playback_controls.py,frame_extractor.py,animation_grid_view.py,animation_segment_preview.py,enhanced_status_bar.pycore/:animation_controller.py,animation_segment_controller.py,auto_detection_controller.py,export_coordinator.pymanagers/:animation_segment_manager.py,recent_files_manager.py,settings_manager.pycoordinators/:signal_coordinator.pyexport/:core/+dialogs/(no separatewidgets/directory)
- Sprite sheet loading via file dialog, drag/drop, and recent-files menu
- Frame extraction in
gridmode andccl(connected-component labeling) mode - Playback controls with precise FPS control (1-60), frame stepping, and looping
- Canvas zoom/pan and optional grid overlay
- Animation splitting with named segments and persisted segment metadata
- Export presets for individual frames, selected frames, sprite sheets, and segments-per-row layouts
- Export formats:
PNG,JPG,BMP
Supported input formats: PNG, JPG, JPEG, BMP, GIF.
uv sync --all-extraspython3 -m venv .venv
source .venv/bin/activate # Linux/macOS
# .venv\Scripts\activate # Windows
pip install -r requirements-dev.txtrequirements*.txt files are kept for pip compatibility; the canonical dependency source is
pyproject.toml + uv.lock.
Launch the desktop app:
python sprite_viewer.py| Key | Action |
|---|---|
Space |
Play/pause |
← / → |
Previous/next frame |
Home / End |
First/last frame |
G |
Toggle grid overlay |
Ctrl+O |
Open sprite sheet |
Ctrl++ / Ctrl+- |
Zoom in/out |
Ctrl+0 |
Fit to window |
Ctrl+1 |
Reset zoom (100%) |
Ctrl+E |
Export frames |
Ctrl+Shift+E |
Export current frame |
Alt+1 to Alt+9 |
Open recent file slot |
Ctrl+Q |
Quit |
uv run pytest
uv run pytest -m unit
uv run pytest -m integration
uv run pytest tests/ui/python3 run_tests.py --unit
python3 run_tests.py --integration
python3 run_tests.py --coveragerun_tests.py does not auto-install dependencies during normal test runs; use
python3 run_tests.py --install only when you explicitly want dependency sync.
uv run ruff check . --fix
uv run ruff format .
uv run basedpyrightuvx deptry . # Detect dependency hygiene issues
uvx pip-audit # Vulnerability audit
uv tool install pre-commit
pre-commit install
pre-commit run --all-filesCLAUDE.md: assistant-oriented engineering notes and API contractstests/README.md: current testing workflow and markers
Open source; use and modify as needed.