Skip to content

Commit 84da322

Browse files
committed
docs(demos) Pad the union-trim crop for breathing room
why: The tight union-trim crop left only a 14px margin, so the content felt cramped against the edges. Restore a 28px margin on all sides β€” comfortable, and just past the terminal's native ~20px padding. what: - Re-render the D variant with -border 28 (382x181 -> 410x209) - Update the comparison page's dimensions and padding note
1 parent 7ad7a03 commit 84da322

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

92 Bytes
Loading

β€Ždocs/demo-crop-comparison.mdβ€Ž

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ Coalescing also unoptimised the file to 360K.
3737
GIF frames are intra-coded; re-encoding to H.264 yielded no usable motion
3838
vectors, so the motion-based detector had nothing to work from.
3939

40-
## D Β· ImageMagick union-trim (full crop) β€” βœ… 382Γ—181 Β· 68K
40+
## D Β· ImageMagick union-trim (full crop) β€” βœ… 410Γ—209 Β· 68K
4141

42-
`-coalesce` β†’ clone/flatten β†’ `-fuzz 8% -trim` β†’ viewport crop β†’ `+14px`
43-
margin β†’ `-layers Optimize`. Removes **all** dead space (horizontal and
44-
vertical). Tightest result, but drops the wide-terminal framing.
42+
`-coalesce` β†’ clone/flatten β†’ `-fuzz 8% -trim` β†’ viewport crop β†’
43+
`-border 28` β†’ `-layers Optimize`. Removes the horizontal and vertical
44+
dead space, then restores a **28px** margin on all sides so the content
45+
isn't cramped (`-border` fills every side with the terminal background;
46+
dial it via the value β€” 20px matches the terminal's native padding).
4547

4648
```{image} _static/demos/crop-comparison/sync-imtrim-opt.gif
4749
:alt: ImageMagick union-trim, cropped to content with margin
@@ -63,7 +65,7 @@ full terminal width so it still reads as a terminal.
6365
| A | ffmpeg cropdetect (black) | 1174Γ—202 | ~0% | ❌ bg above threshold |
6466
| B | ImageMagick TrimBounds | 1175Γ—202, 360K | 0% | ❌ + bloat |
6567
| C | ffmpeg cropdetect mvedges | β€” | β€” | ❌ no motion vectors |
66-
| D | ImageMagick union-trim | 382Γ—181 | ~72% | βœ… tightest |
68+
| D | ImageMagick union-trim | 410Γ—209 | ~64% | βœ… recommended |
6769
| E | vertical-only ffmpeg crop | 1175Γ—181 | ~10% (vertical) | βœ… keeps terminal look |
6870

6971
The only reliable spatial cropper for a terminal GIF is the **ImageMagick

0 commit comments

Comments
Β (0)