diff options
| author | cashmere <cashmere@autistici.org> | 2026-04-26 20:52:19 +0200 |
|---|---|---|
| committer | cashmere <cashmere@autistici.org> | 2026-04-26 20:54:34 +0200 |
| commit | 9bf686f48e4dfcc64c4c9434a63989316f520dba (patch) | |
| tree | 1ac568beabfd8519922258ede5e97566a96a9dae /tests | |
| parent | 4dfd1df3bc1f936ff7119beceae22b19e0c728d3 (diff) | |
| download | kitty-graphics-9bf686f48e4dfcc64c4c9434a63989316f520dba.tar.gz | |
feat(sixel): configurable encoder + per-invocation timeout
Sixel encoding was hard-coded to ImageMagick (`magick'/`convert') with no
timeout, so a malformed image or hung encoder could freeze Emacs and
users could not switch to libsixel's faster `img2sixel'.
- New customs: `kitty-gfx-sixel-encoder-program' (nil = auto-detect:
prefer img2sixel, then magick, then convert), `-encoder-args' (extra
args list), `-encoder-timeout' (float seconds, default 5.0, nil =
no timeout).
- New helper `kitty-gfx--sixel-resolve-encoder' returns
(KIND . ABS-PATH) where KIND is `img2sixel' or `imagemagick' so the
encode pipeline can build the right argv (`-w/-h <px>' vs
`-geometry WxH sixel:-').
- New helper `kitty-gfx--sixel-run-encoder' runs the encoder via
`make-process' with a separate stderr buffer and a `run-at-time'
watchdog that kills the process on timeout; failures and timeouts
are logged and surface as nil from `kitty-gfx--sixel-encode'
rather than freezing Emacs.
- Existing magick/convert path preserved and still chosen automatically
when img2sixel is absent.
- AGENTS.md: dependency note updated to mention img2sixel and the new
customs.
Inspired by and co-authored with @timfel's sixel-graphics.el fork
(https://github.com/timfel/sixel-graphics.el), which introduced the
configurable encoder + timeout pattern.
Refs #4.
Co-authored-by: Tim Felgentreff <timfel@users.noreply.github.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions
