Skip to content

Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.

release: v2.0.3 — one standing height; CI installs ffmpeg and webp

Soohong Kim4100cdc930c8
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 504848c..e219b0a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,6 +19,9 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - name: Install the pipeline's required binaries (ffmpeg for video-frames, libwebp for video-loop)
+ run: sudo apt-get update -qq && sudo apt-get install -y -qq ffmpeg webp
+
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d108132..7d76ce2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,8 +2,9 @@
All notable public changes to `sprite-gen` are recorded here. Versions track the `version:` field in `SKILL.md` and `pyproject.toml`.
-## Unreleased (v2.0.3)
+## v2.0.3 - One standing height
+- CI installs `ffmpeg` and `webp` (the declared required binaries) so the video tests run there; the `video-loop` tests that need `img2webp` skip cleanly where it is absent.
- `video-loop` `body_h` is the standing height (tallest floor-contact frame) instead of the cycle's median bbox height, which under-measured jumps and over-scaled them by ~22 %; `--body-height N` scales every state to the same standing height directly in the pipeline (`--strip-height` remains the cap). README heroes regenerated at one standing height.
## v2.0.2 - Heroes from the pipeline
diff --git a/tests/video/test_video_pipeline.py b/tests/video/test_video_pipeline.py
index 47474c7..c637745 100644
--- a/tests/video/test_video_pipeline.py
+++ b/tests/video/test_video_pipeline.py
@@ -292,6 +292,7 @@ def test_strip_cap_is_on_pixels_not_cells() -> None:
assert strip.width == meta["w"] * meta["frames"]
[email protected](not HAS_IMG2WEBP, reason="img2webp not installed")
def test_gif_frame_count_follows_cycle_length_at_a_fixed_playback_rate(tmp_path: Path) -> None:
"""A 2.5 s jump used to get the same 12 frames as a 1.1 s walk and play at ~5 fps
(2026-09-09, lead: '점프만 혼자 왜 프레임이 느리냐')."""
@@ -308,6 +309,7 @@ def test_gif_frame_count_follows_cycle_length_at_a_fixed_playback_rate(tmp_path:
assert rep["n_out"] <= rep["cycle"]["length"] and rep2["n_out"] <= rep2["cycle"]["length"]
[email protected](not HAS_IMG2WEBP, reason="img2webp not installed")
def test_default_gif_rate_keeps_every_cycle_frame(tmp_path: Path) -> None:
"""24 fps source, 24 fps GIF: a 61-frame jump cycle stays 61 frames at ~42 ms."""
(tmp_path / "j").mkdir()
@@ -316,6 +318,7 @@ def test_default_gif_rate_keeps_every_cycle_frame(tmp_path: Path) -> None:
assert rep["n_out"] == rep["cycle"]["length"] and 40 <= rep["delay_ms"] <= 43 and rep["gif_fps"] == 24.0
[email protected](not HAS_IMG2WEBP, reason="img2webp not installed")
def test_fixed_cycle_cuts_exactly_and_skips_detection(tmp_path: Path) -> None:
"""A clip with too few repeats for the periodicity gate can still be cut where the
caller says (2026-09-09: the reel's jump clip held 2.3 hops)."""
@@ -329,6 +332,7 @@ def test_fixed_cycle_cuts_exactly_and_skips_detection(tmp_path: Path) -> None:
loop_mod.run_loop(tmp_path / "keyed", tmp_path / "fx3", fps=24.0, state="jump", min_len=None, max_len=None, n_out=None, seam_max=5.0, name="f3", report_path=None, cycle_mode="fixed")
[email protected](not HAS_IMG2WEBP, reason="img2webp not installed")
def test_strip_height_caps_the_output_size(tmp_path: Path) -> None:
files = _gait_frames(tmp_path, period=12, n=60, size=(160, 400))
rep = loop_mod.run_loop(tmp_path / "keyed", tmp_path / "h", fps=24.0, state="walk", min_len=None, max_len=None, n_out=None, seam_max=2.0, name="h", report_path=None, strip_height=100)