Commit Graph

12 Commits

Author SHA1 Message Date
Nicholas Marriott
8856c1e669 Merge image_merge into 4902-image-support
Keep retained indexed SIXEL data and the bounded per-terminal output cache.
Use the cleaned-up decoder and RGBA encoder from image_merge, including
parser memory limits, pixel-size handling and references for pending output.
Match retained SIXEL scaling to the shared image cell footprint and emit
black definitions for undefined colour registers.

Keep Kitty input, output, layers and placeholders. Adapt backend selection,
flags, drawing and cleanup to the callbacks and Iscrl capability. Keep the
pane-status repaint with the requested XXX comment.

Replace the elaborate fallback with image_merge's implementation, removing
its caches, sample structures, quadrant/sextant features and ACS additions.
Keep the image_merge regressions and adapt the Kitty tests to the simpler
fallback. Use skip status 101 and disable Python bytecode for image tests.

Small changes still outside image_merge:
- Guard zero-height synchronized redraws before bit_nset.
- Select the image backend when the tty opens.
- Enable imagescroll by default for Kitty and Ghostty.
- Keep the explanatory manual-window pixel-size comment (comment only).
- Keep the additional SIXEL fixtures and visual test tools.

Validation: image-enabled and disabled builds; 31 image and 13 related
regressions pass normally and under ASAN. All image tests skip without
images. Focused palette, parser, scaling, transparency and Kitty layer
tests also pass after the retained-output adjustments. Diff checks clean.
2026-10-14 14:28:22 +01:00
Nicholas Marriott
4b06bdd63b Merge master into 4902-image-support 2026-10-13 21:18:26 +01:00
Michael Grant
f988a7bc0b Match Kitty image sizing and layer order, preserve trailing backgrounds, and add regression coverage. 2026-10-10 17:51:50 +02:00
Michael Grant
729b7e7a13 Rebased on current master without conflicts and completed the cleanup: comments above new function in longer functions, metadata comments, aligned declarations and simpler guards, consistent braces and shorter lines. 2026-10-09 23:37:40 +02:00
Michael Grant
6826d87bdb Fix overflow-prone size check. 2026-10-09 23:10:15 +02:00
Michael Grant
e29f9f7076 Do not allocate when a Kitty payload chunk decodes to no bytes. 2026-10-09 23:10:15 +02:00
Michael Grant
8f1efea3da Fix Kitty image deletion, placeholders and placement geometry. 2026-10-09 23:10:15 +02:00
Michael Grant
2118a927e9 Fix Kitty image cursor movement, replies and screen clearing. 2026-10-09 23:10:15 +02:00
Michael Grant
c6112a2a3a Accept independently padded base64 chunks in Kitty image transfers. 2026-10-09 23:10:15 +02:00
Michael Grant
3db73d7fdb Clean up image support and add regression tests 2026-10-09 23:10:15 +02:00
Michael Grant
c5969765b1 Cleanup 2026-10-09 23:10:15 +02:00
Michael Grant
f9cf0b9852 Implement generalised image support
Support Kitty and SIXEL input and output with grid-resident image layers, history and copy-mode integration, text fallback rendering, and damage-rectangle redraws.

Consolidate the image work through 250f96b4b onto the redraw-damage-rectangles-new base, excluding the superseded redraw implementation and its historical merges. The original history is preserved in backup/4902-image-support-before-master-rebase-20261003.
2026-10-09 23:10:15 +02:00