Skip to content

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

Merge origin/main (59b2738, 2.45.3) into main: the release carries the UTF-8 output fix as unreleased

Soohong Kim86afc44da281
diff --cc CHANGELOG.md
index 25ff9b2,e6346c5..fce281a
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -2,10 -2,13 +2,17 @@@
All notable public changes to `sprite-gen` are recorded here. Versions track the `version:` field in `SKILL.md` and `pyproject.toml`.
+## Unreleased
+
+- **Fix: every command prints on a Windows console or pipe in a legacy code page.** A line a command prints can hold an em dash, Korean or a path in any script; on cp949 (Korean Windows) or cp1252 Python could not encode it, and the command died at the print after its work was done (`background-tile` on Korean Windows). Each command's entry now reopens stdout and stderr as UTF-8 where they are not already (`sprite_gen.util.console.utf8_streams`, called first by every `main()` and by `sprite-gen`); importing sprite_gen leaves a program's streams alone. Test: `tests/util/test_console.py`.
+
+ ## v2.45.3 - The seam check reads the frames that play when the body anchor spreads a sideways slide; such a cut passes again, as it did in 2.44.0
+
+ **Upgrading from 2.45.2: Every cut 2.45.2 passed, and every `--anchor motion-auto` run, gives the same bytes as 2.45.2.** Only `--anchor body` cuts that 2.45.2 refused because of the walk sliding sideways before the anchor can now pass, read on the frames that play. Refused cuts print the same error line as before, the report's `producer` field names the new version, and there are no restoration schema changes.
+
+ - **Fix: `video-loop --anchor body` no longer refuses an evenly sliding walk whose wrap the ramp closed when flow repair makes no frame.** Up to 2.44.0 jump repair remade any frame after a step 1.4 times the median, reading rendered cells. Since 2.45.0 flow repair makes no frame for an evenly sliding walk, so the gate read source frames and refused a wrap the ramp closed: on the tests' synthetic walk (0.1 px right a frame, 2.4 px over 24 frames), 3.08 on source frames, 1.33 on cells that play. Now, where source frames refuse the wrap, `wrap_dx_px` is not 0, no frame was made, and the cut is seam-gated, the gate reads the cells that play again (`seam_as_filmed`). It passes the cut on them (`seam_measurement: rendered-cells`, `resampled_seam_ratio`) when the wrap and largest step against the mean step are both within `--seam-max`. Every step is checked because the ramp moves wrap jumps inward. The report gains `seam_after_anchor` (`source_seam_ratio`, `seam_ratio`, `largest_step_ratio`, `largest_step_into`). Passed cuts remain the same bytes, including `--seam-max 1000`; `--anchor motion`, `motion-auto`, `none` and `feet` do not change, nor do pinned clips, flags, or restoration schemas. The reading is only as fine as the limit: half a stride with swapped legs reads 1.93 on cells that play and passes; without slide it reads 2.19 and is refused. [loop review](docs/loop-review.md#the-body-anchor-and-the-seam-gate)
+ - **Tests** — `tests/video/test_body_anchor_gate.py` (the sliding walk cut by hand from four starts with the repair off passes on the cells that play, and so does the walk cut by hand with the repair on and the stride the search finds, the repair making no frame; the source frames' refusal is the one `--anchor none` gives the same cut; a wrap the ramp does not close is refused with the same error line as `--anchor none` gives for one, two, three or four frames at the wrap moved 4 or 10 px sideways, a frame torn across, holed, or moved 8 px down, and cuts of 18 and 28 frames off the stride; a cut the source frames pass is not read again for the walk without the slide, the sliding walk under `--seam-max 1000`, and a first frame moved 3 px; a pinned clip of the sliding walk is gated by its pin and read on its source frames).
+
## v2.45.2 - The new `video-loop --overlap-wrap off` turns the overlapped wrap off on its own; the motion anchor's fine search is faster and gives the same values
**Upgrading from 2.45.1: By default a run delivers the same bytes as 2.45.1, sooner, and only `--overlap-wrap off` changes what is delivered.** With the default `--overlap-wrap on`, the loop files, the frames and the report are the same bytes as 2.45.1 (the report's `producer` field names the new version), and `video-loop --anchor motion-auto` finishes sooner. With `--overlap-wrap off`, the overlapped wrap is not tried (the report's `wrap_overlap.skipped` reads `turned off (--overlap-wrap off)`, no RIFE calls), a `warning:` line is printed, and the seam gate refuses the cut as filmed, so the run fails on its seam instead of spending minutes of CPU on RIFE. No restoration schemas change: `source-restoration-v5`, repair report `schema_version` 4, comparison `schema_version` 6.