Repository navigation
Moving pictures: Kitty animation frames - #46
Merged
Merged
Conversation
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
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (5)
✨ Finishing Touches📝 Generate docstrings
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: a host could give a terminal one still picture. An animated GIF reached Kitty as its first frame only.
After: a
TerminalPicturecan be built fromTerminalPictureFrames, 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 stillRgba.How:
EncodeKittywrites 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