Skip to content

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

video-loop: 24 fps GIF default, explicit fixed cut, strip-height; README heroes are pipeline outputs

Soohong Kim416e36ad64cb
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d6e54b5..2c67047 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,13 @@
All notable public changes to `sprite-gen` are recorded here. Versions track the `version:` field in `SKILL.md` and `pyproject.toml`.
+## Unreleased (v2.0.2)
+
+- `video-loop` GIF/WebP default rate is now 24 fps (the source rate): every cycle frame is kept, so fast actions never read slow; `--gif-fps 12` restores the lighter output.
+- `video-loop --cycle fixed --start N --length L` cuts an explicitly named cycle without detection (reported as `kind = "fixed"`, seam gate still applied) — for clips with too few repeats for the periodicity gate.
+- `video-loop --strip-height` caps the cell/strip/GIF height so an output can be produced at its display size directly from the pipeline.
+- README hero GIFs are `video-loop` outputs verbatim; the jump `<img>` height matches its taller file.
+
## v2.0.1 - Jump loops play at the same rate
- `video-loop` GIF/WebP frame count follows the cycle length at a fixed playback rate (`--gif-fps`, default 12) instead of a per-state fixed count: a 2.5 s jump now gets ~30 frames at ~84 ms instead of 12 frames at 210 ms, so every state plays at the same density. `--n-out` still overrides; the report records `gif_fps`.
diff --git a/README.es.md b/README.es.md
index da0ad57..dd7db7a 100644
--- a/README.es.md
+++ b/README.es.md
@@ -11,7 +11,7 @@
<p align="center">
<img src="docs/assets/hero-paladin-walk.gif" height="200" alt="paladin walk loop" />
<img src="docs/assets/hero-paladin-run.gif" height="200" alt="paladin run loop" />
- <img src="docs/assets/hero-paladin-jump.gif" height="200" alt="paladin jump loop" />
+ <img src="docs/assets/hero-paladin-jump.gif" height="301" alt="paladin jump loop" />
<img src="docs/assets/hero-wolf-walk.gif" height="200" alt="wolf walk loop" />
<img src="docs/assets/hero-slime-walk.gif" height="200" alt="slime walk loop" />
</p>
diff --git a/README.fr.md b/README.fr.md
index a249f17..9d4e686 100644
--- a/README.fr.md
+++ b/README.fr.md
@@ -11,7 +11,7 @@
<p align="center">
<img src="docs/assets/hero-paladin-walk.gif" height="200" alt="paladin walk loop" />
<img src="docs/assets/hero-paladin-run.gif" height="200" alt="paladin run loop" />
- <img src="docs/assets/hero-paladin-jump.gif" height="200" alt="paladin jump loop" />
+ <img src="docs/assets/hero-paladin-jump.gif" height="301" alt="paladin jump loop" />
<img src="docs/assets/hero-wolf-walk.gif" height="200" alt="wolf walk loop" />
<img src="docs/assets/hero-slime-walk.gif" height="200" alt="slime walk loop" />
</p>
diff --git a/README.ja.md b/README.ja.md
index f70bb82..5ce2ab9 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -11,7 +11,7 @@
<p align="center">
<img src="docs/assets/hero-paladin-walk.gif" height="200" alt="paladin walk loop" />
<img src="docs/assets/hero-paladin-run.gif" height="200" alt="paladin run loop" />
- <img src="docs/assets/hero-paladin-jump.gif" height="200" alt="paladin jump loop" />
+ <img src="docs/assets/hero-paladin-jump.gif" height="301" alt="paladin jump loop" />
<img src="docs/assets/hero-wolf-walk.gif" height="200" alt="wolf walk loop" />
<img src="docs/assets/hero-slime-walk.gif" height="200" alt="slime walk loop" />
</p>
diff --git a/README.ko.md b/README.ko.md
index 3f5a25e..f29bf7f 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -11,7 +11,7 @@
<p align="center">
<img src="docs/assets/hero-paladin-walk.gif" height="200" alt="paladin walk loop" />
<img src="docs/assets/hero-paladin-run.gif" height="200" alt="paladin run loop" />
- <img src="docs/assets/hero-paladin-jump.gif" height="200" alt="paladin jump loop" />
+ <img src="docs/assets/hero-paladin-jump.gif" height="301" alt="paladin jump loop" />
<img src="docs/assets/hero-wolf-walk.gif" height="200" alt="wolf walk loop" />
<img src="docs/assets/hero-slime-walk.gif" height="200" alt="slime walk loop" />
</p>
diff --git a/README.md b/README.md
index 03fe48d..12c55cb 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
<p align="center">
<img src="docs/assets/hero-paladin-walk.gif" height="200" alt="paladin walk loop" />
<img src="docs/assets/hero-paladin-run.gif" height="200" alt="paladin run loop" />
- <img src="docs/assets/hero-paladin-jump.gif" height="200" alt="paladin jump loop" />
+ <img src="docs/assets/hero-paladin-jump.gif" height="301" alt="paladin jump loop" />
<img src="docs/assets/hero-wolf-walk.gif" height="200" alt="wolf walk loop" />
<img src="docs/assets/hero-slime-walk.gif" height="200" alt="slime walk loop" />
</p>
diff --git a/README.zh-Hans.md b/README.zh-Hans.md
index 4b538b8..c05f315 100644
--- a/README.zh-Hans.md
+++ b/README.zh-Hans.md
@@ -11,7 +11,7 @@
<p align="center">
<img src="docs/assets/hero-paladin-walk.gif" height="200" alt="paladin walk loop" />
<img src="docs/assets/hero-paladin-run.gif" height="200" alt="paladin run loop" />
- <img src="docs/assets/hero-paladin-jump.gif" height="200" alt="paladin jump loop" />
+ <img src="docs/assets/hero-paladin-jump.gif" height="301" alt="paladin jump loop" />
<img src="docs/assets/hero-wolf-walk.gif" height="200" alt="wolf walk loop" />
<img src="docs/assets/hero-slime-walk.gif" height="200" alt="slime walk loop" />
</p>
diff --git a/SKILL.md b/SKILL.md
index 2e189e6..7f7ef5a 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -1,6 +1,6 @@
---
name: sprite-gen
-version: 2.0.1
+version: 2.0.2
description: "Generate clean 2D game sprites and animation atlases with a component-row pipeline: base identity, numeric sprite-request SSoT, per-state layout guides, image-gen row strips, chroma-key alpha cleanup, connected-component frame extraction, cell-based atlas composition, QA reports, and runtime manifest frame_layout. Its curation webview also serves ANY image-candidate set (icons, logos, generated drafts) — agent chat can't render images, this can: unpack_atlas_run --pngs-dir import, then serve_curation side-by-side compare/pick. Palette-swap bake (`sprite-gen recolor`) turns a base sheet + palette map into N colourway sheets; the curation view blink-compares and adopts a pick into curation.json.recolor.picked. Curation triggers (KR/EN): 큐레이션, 큐레이션뷰, 큐레이션 해줘, 이미지 후보 보여줘/안 보임, 나란히 비교, 골라볼게 띄워줘, curation view, show image candidates side by side, let me pick. Recolor triggers (KR/EN): 팔레트 스왑, 팔레트 베이크, 리컬러, 색깔 바꾸기, 컬러웨이, 색 변형, 팔레트 맵, 색갈이, palette swap, recolor, colourway, colorway, bake variants, palette map."
license: Apache-2.0
depends_on:
diff --git a/docs/assets/hero-paladin-jump.gif b/docs/assets/hero-paladin-jump.gif
index 0b7fd2b..e91ae3a 100644
Binary files a/docs/assets/hero-paladin-jump.gif and b/docs/assets/hero-paladin-jump.gif differ
diff --git a/docs/assets/hero-paladin-run.gif b/docs/assets/hero-paladin-run.gif
index 24d1c51..b926270 100644
Binary files a/docs/assets/hero-paladin-run.gif and b/docs/assets/hero-paladin-run.gif differ
diff --git a/docs/assets/hero-paladin-walk.gif b/docs/assets/hero-paladin-walk.gif
index 41997df..964c829 100644
Binary files a/docs/assets/hero-paladin-walk.gif and b/docs/assets/hero-paladin-walk.gif differ
diff --git a/docs/assets/hero-slime-walk.gif b/docs/assets/hero-slime-walk.gif
index 8fa314a..1fa614d 100644
Binary files a/docs/assets/hero-slime-walk.gif and b/docs/assets/hero-slime-walk.gif differ
diff --git a/docs/assets/hero-wolf-walk.gif b/docs/assets/hero-wolf-walk.gif
index dd3df3c..e518bd6 100644
Binary files a/docs/assets/hero-wolf-walk.gif and b/docs/assets/hero-wolf-walk.gif differ
diff --git a/docs/video-pipeline.md b/docs/video-pipeline.md
index 27899c4..38e6318 100644
--- a/docs/video-pipeline.md
+++ b/docs/video-pipeline.md
@@ -104,7 +104,11 @@ report carries `cycle.kind = "one-shot"` plus `periodic_attempt` (the periodicit
failed and the window), `table.md` has a `kind` column, and the same seam and
animation gates still apply. `--cycle periodic` keeps the old hard failure; `--cycle
one-shot` forces the excursion cut. A clip that never leaves its rest pose fails loud
-in both detectors.
+in both detectors. `--cycle fixed --start N --length L` skips detection and cuts exactly
+those frames — for a clip that holds too few repeats for the periodicity gate but whose
+cycle is known (the 2026-09-09 reel jump: 2.3 hops in 145 frames). It is an explicit
+instruction, not a failover: the report says `kind = "fixed"`, and the seam gate still
+applies.
Outputs:
@@ -121,9 +125,11 @@ Outputs:
(a 30 fps render of 24 fps cells is a 5:4 pulldown and judders).
- `<name>.gif` — `n_out` frames evenly across the cycle, 1-bit alpha, disposal 2, `loop=0`.
`n_out` is a **playback density, not a fixed count**: `round(cycle_seconds × --gif-fps)`
- (default 12 fps, floor 4, never more than the cycle holds), so a 2.5 s jump gets ~30 frames
- and a 1.1 s walk ~13 and both play at the same rate. A fixed 12 made the jump hold each
- frame 210 ms while the walk held 90 ms (2026-09-09). `--n-out` still overrides.
+ (default 24 fps = the source rate, so every cycle frame is kept; floor 4, never more than
+ the cycle holds). A fixed 12 made a 2.5 s jump hold each frame 210 ms while a 1.1 s walk
+ held 90 ms, and even an even 12 fps read sluggish on a jump (2026-09-09). `--n-out` and
+ `--gif-fps` still override; `--strip-height` caps the cell/strip/GIF height (scaled down,
+ never up) when the output has a target size such as a README hero.
- `<name>.webp` — same frames, lossless, `img2webp -exact` (Pillow's animated WebP writer
does not pass `exact` and rewrites RGB under transparent pixels).
diff --git a/pyproject.toml b/pyproject.toml
index 56b1d1d..a0a5666 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
name = "sprite-gen"
# Release discipline: keep this package metadata version synchronized with
# SKILL.md's `version:` field in the same release commit.
-version = "2.0.1"
+version = "2.0.2"
description = "Component-row pipeline for clean 2D game sprites and animation atlases"
readme = "README.md"
license = "Apache-2.0"
diff --git a/sprite_gen/video/loop.py b/sprite_gen/video/loop.py
index ba1ed43..158d92c 100644
--- a/sprite_gen/video/loop.py
+++ b/sprite_gen/video/loop.py
@@ -45,11 +45,11 @@ STRIP_MAX_HEIGHT = 520
SEAM_RATIO_MAX = 2.0 # loop seam / mean adjacent distance inside the cycle
SPECK_MIN_FRACTION = 0.01 # detached components smaller than this fraction of the body are keying specks
PERIODICITY_MIN = 0.15 # the period must dip at least 15% below the profile mean (flat profile = no repeat)
-GIF_FPS_DEFAULT = 12.0 # GIF/WebP playback density: n_out = cycle_seconds x this, so a 2.5 s jump and a 1.1 s walk play at the same rate
+GIF_FPS_DEFAULT = 24.0 # GIF/WebP playback density = the source rate: every cycle frame is kept, a fast action never looks slow (12 made a jump read sluggish, 2026-09-09)
GIF_FRAMES_MIN = 4
ONE_SHOT_MIN_CONTRAST = 3.0 # one-shot: the excursion peak must stand this far above the rest-pose noise (in MADs)
ONE_SHOT_PAD = 2 # one-shot: rest frames kept on each side of the excursion so the seam is rest -> rest
-CYCLE_MODES = ("auto", "periodic", "one-shot")
+CYCLE_MODES = ("auto", "periodic", "one-shot", "fixed")
@dataclass(frozen=True)
@@ -192,6 +192,21 @@ def detect_one_shot(D: np.ndarray, *, min_len: int, max_len: int) -> dict[str, A
}
+def fixed_cycle(D: np.ndarray, *, start: int, length: int) -> dict[str, Any]:
+ """An explicitly requested cut (`--cycle fixed --start N --length L`): no detection, no
+ periodicity gate — the caller says which frames are the cycle and the report says so
+ (kind = "fixed"). The seam is still measured and the seam gate still applies."""
+ n = D.shape[0]
+ if start < 0 or length < 2 or start + length > n:
+ raise SystemExit(f"video-loop: --start {start} --length {length} does not fit {n} frames")
+ end = start + length - 1
+ adjacent = np.array([D[i, i + 1] for i in range(start, end)])
+ inner = float(adjacent.mean())
+ seam = float(D[start, end])
+ return {"kind": "fixed", "start": start, "length": length, "seam": seam, "inner_mean_adjacent": inner,
+ "ratio": seam / inner if inner > 0 else math.inf, "period_global": None, "periodicity": None}
+
+
def _drop_specks(image: Image.Image, min_fraction: float) -> tuple[Image.Image, int]:
"""Erase detached alpha components smaller than `min_fraction` of the largest one."""
a = np.asarray(image)[..., 3] > 16
@@ -341,6 +356,9 @@ def run_loop(
report_path: Path | None,
cycle_mode: str = "auto",
gif_fps: float = GIF_FPS_DEFAULT,
+ start: int | None = None,
+ length: int | None = None,
+ strip_height: int = STRIP_MAX_HEIGHT,
) -> dict[str, Any]:
if cycle_mode not in CYCLE_MODES:
raise SystemExit(f"video-loop: unknown --cycle {cycle_mode!r}; expected one of {', '.join(CYCLE_MODES)}")
@@ -354,7 +372,11 @@ def run_loop(
hi = max_len if max_len is not None else max(lo + 2, round(n * prof.max_frac))
D = distance_matrix(files)
periodic_attempt: dict[str, Any] | None = None
- if cycle_mode == "one-shot":
+ if cycle_mode == "fixed":
+ if start is None or length is None:
+ raise SystemExit("video-loop: --cycle fixed needs --start and --length")
+ cycle = fixed_cycle(D, start=start, length=length)
+ elif cycle_mode == "one-shot":
cycle = detect_one_shot(D, min_len=lo, max_len=hi)
else:
cycle = detect_cycle(D, min_len=lo, max_len=hi)
@@ -396,7 +418,7 @@ def run_loop(
frames.append(im)
cycle_seconds = L / fps
- strip, strip_meta = build_strip(frames, cycle_seconds=cycle_seconds)
+ strip, strip_meta = build_strip(frames, max_height=strip_height, cycle_seconds=cycle_seconds)
strip_path = out_dir / f"{name}.strip.png"
strip.save(strip_path)
atomic_write_text(out_dir / f"{name}.strip.json", json.dumps(strip_meta, indent=2) + "\n")
@@ -463,7 +485,10 @@ def add_arguments(parser: argparse.ArgumentParser) -> None:
parser.add_argument("--n-out", type=int, help="frames in the GIF/WebP (default: cycle seconds x --gif-fps)")
parser.add_argument("--gif-fps", type=float, default=GIF_FPS_DEFAULT, help=f"GIF/WebP playback density (default {GIF_FPS_DEFAULT:g}); every state plays at this rate regardless of cycle length")
parser.add_argument("--seam-max", type=float, default=SEAM_RATIO_MAX, help=f"loop seam gate (default {SEAM_RATIO_MAX})")
- parser.add_argument("--cycle", choices=CYCLE_MODES, default="auto", help="auto: periodic first, one-shot failover for action states (recorded in the report); periodic / one-shot force one detector")
+ parser.add_argument("--cycle", choices=CYCLE_MODES, default="auto", help="auto: periodic first, one-shot failover for action states (recorded in the report); periodic / one-shot force one detector; fixed cuts exactly --start/--length (no detection, reported as kind=fixed)")
+ parser.add_argument("--start", type=int, help="fixed cut: first keyed frame of the cycle (with --cycle fixed)")
+ parser.add_argument("--length", type=int, help="fixed cut: cycle length in frames (with --cycle fixed)")
+ parser.add_argument("--strip-height", type=int, default=STRIP_MAX_HEIGHT, help=f"cell/strip/GIF height cap in px (default {STRIP_MAX_HEIGHT}); the cycle is scaled down to fit, never up")
parser.add_argument("--name", default="loop", help="basename for strip/gif/webp outputs")
parser.add_argument("--report", type=Path)
@@ -475,6 +500,7 @@ def run(**kwargs: object) -> int:
min_len=kwargs.get("min_len"), max_len=kwargs.get("max_len"), n_out=kwargs.get("n_out"), # type: ignore[arg-type]
seam_max=float(kwargs.get("seam_max") or SEAM_RATIO_MAX), name=str(kwargs.get("name") or "loop"), report_path=kwargs.get("report"), # type: ignore[arg-type]
cycle_mode=str(kwargs.get("cycle") or "auto"), gif_fps=float(kwargs.get("gif_fps") or GIF_FPS_DEFAULT),
+ start=kwargs.get("start"), length=kwargs.get("length"), strip_height=int(kwargs.get("strip_height") or STRIP_MAX_HEIGHT), # type: ignore[arg-type]
)
summary = {k: payload[k] for k in ("state", "frames_total", "window", "cycle_seconds", "n_out", "delay_ms", "resampled_seam_ratio", "specks_dropped", "report")}
summary["cycle"] = {k: payload["cycle"].get(k) for k in ("kind", "start", "length", "period_global", "ratio")}
diff --git a/tests/docs/test_hero_assets.py b/tests/docs/test_hero_assets.py
new file mode 100644
index 0000000..1d7e900
--- /dev/null
+++ b/tests/docs/test_hero_assets.py
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: Apache-2.0
+"""The README hero GIFs are pipeline outputs shown at their real size: every hero <img>
+height equals the file's pixel height (a jump has air room, so it is taller), every hero
+loops forever, and the six READMEs agree."""
+
+from __future__ import annotations
+
+import re
+from pathlib import Path
+
+from PIL import Image
+
+ROOT = Path(__file__).resolve().parents[2]
+READMES = ["README.md", "README.ko.md", "README.ja.md", "README.zh-Hans.md", "README.es.md", "README.fr.md"]
+TAG = re.compile(r'<img src="docs/assets/(hero-[a-z-]+\.gif)" height="(\d+)"')
+
+
+def test_hero_img_heights_match_the_files_in_every_readme() -> None:
+ sets = []
+ for name in READMES:
+ tags = TAG.findall((ROOT / name).read_text(encoding="utf-8"))
+ assert tags, f"{name} has no hero tags"
+ sets.append(tags)
+ for gif, height in tags:
+ im = Image.open(ROOT / "docs" / "assets" / gif)
+ assert im.height == int(height), (name, gif, im.height, height)
+ assert im.info.get("loop") == 0 and im.n_frames > 1, gif
+ assert all(s == sets[0] for s in sets), "hero rows differ between READMEs"
diff --git a/tests/video/test_video_pipeline.py b/tests/video/test_video_pipeline.py
index 17a0bbc..6cfcccc 100644
--- a/tests/video/test_video_pipeline.py
+++ b/tests/video/test_video_pipeline.py
@@ -297,17 +297,45 @@ def test_gif_frame_count_follows_cycle_length_at_a_fixed_playback_rate(tmp_path:
(2026-09-09, lead: '점프만 혼자 왜 프레임이 느리냐')."""
(tmp_path / "long").mkdir()
_gait_frames(tmp_path / "long", period=60, n=150, stamp=True) # 60 frames @ 24 fps = 2.5 s
- rep = loop_mod.run_loop(tmp_path / "long" / "keyed", tmp_path / "long-out", fps=24.0, state="jump", min_len=None, max_len=None, n_out=None, seam_max=2.0, name="j", report_path=None)
+ rep = loop_mod.run_loop(tmp_path / "long" / "keyed", tmp_path / "long-out", fps=24.0, state="jump", min_len=None, max_len=None, n_out=None, seam_max=2.0, name="j", report_path=None, gif_fps=12.0)
assert rep["n_out"] == 30 and 80 <= rep["delay_ms"] <= 90
(tmp_path / "short").mkdir()
_gait_frames(tmp_path / "short", period=26, n=100, stamp=True) # 1.08 s
- rep2 = loop_mod.run_loop(tmp_path / "short" / "keyed", tmp_path / "short-out", fps=24.0, state="walk", min_len=None, max_len=None, n_out=None, seam_max=2.0, name="w", report_path=None)
+ rep2 = loop_mod.run_loop(tmp_path / "short" / "keyed", tmp_path / "short-out", fps=24.0, state="walk", min_len=None, max_len=None, n_out=None, seam_max=2.0, name="w", report_path=None, gif_fps=12.0)
assert 12 <= rep2["n_out"] <= 14 and abs(rep2["delay_ms"] - rep["delay_ms"]) <= 15 # ~1.1 s at 12 fps; the period may resolve to 24-26
explicit = loop_mod.run_loop(tmp_path / "short" / "keyed", tmp_path / "short-out2", fps=24.0, state="walk", min_len=None, max_len=None, n_out=8, seam_max=2.0, name="w8", report_path=None)
assert explicit["n_out"] == 8
assert rep["n_out"] <= rep["cycle"]["length"] and rep2["n_out"] <= rep2["cycle"]["length"]
+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()
+ _gait_frames(tmp_path / "j", period=61, n=150, stamp=True)
+ rep = loop_mod.run_loop(tmp_path / "j" / "keyed", tmp_path / "j-out", fps=24.0, state="jump", min_len=None, max_len=None, n_out=None, seam_max=2.0, name="j", report_path=None)
+ assert rep["n_out"] == rep["cycle"]["length"] and 40 <= rep["delay_ms"] <= 43 and rep["gif_fps"] == 24.0
+
+
+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)."""
+ _one_shot_frames(tmp_path) # 144 frames, one hop at 60..76 — no period at all
+ rep = loop_mod.run_loop(tmp_path / "keyed", tmp_path / "fx", fps=24.0, state="jump", min_len=None, max_len=None, n_out=None, seam_max=5.0, name="f", report_path=None, cycle_mode="fixed", start=50, length=40)
+ assert rep["cycle"]["kind"] == "fixed" and rep["cycle"]["start"] == 50 and rep["cycle"]["length"] == 40
+ assert rep["periodic_attempt"] is None and len(list((tmp_path / "fx" / "cycle").glob("frame-*.png"))) == 40
+ with pytest.raises(SystemExit, match="does not fit"):
+ loop_mod.run_loop(tmp_path / "keyed", tmp_path / "fx2", fps=24.0, state="jump", min_len=None, max_len=None, n_out=None, seam_max=5.0, name="f2", report_path=None, cycle_mode="fixed", start=120, length=40)
+ with pytest.raises(SystemExit, match="needs --start"):
+ 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")
+
+
+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)
+ assert rep["strip"]["h"] <= 100
+ assert Image.open(rep["gif"]["file"] if Path(rep["gif"]["file"]).is_absolute() else tmp_path / "h" / rep["gif"]["file"]).height <= 100
+
+
def test_drop_specks_erases_detached_slivers_only() -> None:
im = Image.new("RGBA", (40, 40), (0, 0, 0, 0))
for y in range(5, 35):