Skip to content

Moving pictures: Kitty animation frames - #46

Merged
HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-0yfpwo
Oct 7, 2026
Merged

HarryCordewener merged 1 commit into
mainfrom
claude/project-thread-0yfpwo

Conversation

@HarryCordewener

Copy link
Copy Markdown
Member

Before: a host could give a terminal one still picture. An animated GIF reached Kitty as its first frame only.

After: a TerminalPicture can be built from TerminalPictureFrames, each a whole frame plus how long it shows. Kitty gets the image as before, then each later frame (a=f,X=1,z=<ms>), the first frame's duration (a=a,r=1,z=), and a start that loops forever (a=a,s=3,v=1). From then on the terminal plays it with nothing more sent. iTerm2, sixel and half blocks draw the first frame, which is still Rgba.

How: EncodeKitty writes the image and its frames as one cached transmission per size, so other connections get a copy, the same as before. A frame list of one counts as a still picture. The tests cover the frame and control sequences, the first frame where the terminal can't animate, and frame size validation.

Not checked in a real terminal: whether kitty animates an image shown only through Unicode placeholders (virtual placement). The protocol ties an animation to the image, not to a placement, so it should.

🤖 Generated with Claude Code

https://claude.ai/code/session_01448U5MvpKkRkBjwzkkpPFP


Generated by Claude Code

A TerminalPicture can be made from TerminalPictureFrames, each a whole
frame with its duration. Kitty is sent the later frames after the image
(a=f,X=1,z=<ms>), the first frame's gap, and a looping start
(a=a,s=3,v=1). Every other method draws the first frame, which is the
picture's Rgba.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01448U5MvpKkRkBjwzkkpPFP
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: d4f4397d-b6b7-4ed2-824c-3dd7120d9fab
📥 Commits

Reviewing files that changed from the base of the PR and between 52dd3c8 and 193d79f.

📒 Files selected for processing (5)
  • MarkupString.Ansi/Emitters/TerminalPictureWriter.cs
  • MarkupString.Ansi/PublicAPI.Unshipped.txt
  • MarkupString.Ansi/README.md
  • MarkupString.Ansi/TerminalPicture.cs
  • MarkupString.Tests/Ansi/TerminalFeatureTests.cs
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@HarryCordewener
HarryCordewener marked this pull request as ready for review October 7, 2026 20:42
@HarryCordewener
HarryCordewener merged commit 5af1044 into main Oct 7, 2026
6 of 7 checks passed
@HarryCordewener
HarryCordewener deleted the claude/project-thread-0yfpwo branch October 7, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants