Spriteful TErminal GrAphics Protocol: Difference between revisions

No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 6: Line 6:
* Autumn Lamonte's [https://gitlab.com/klamonte/jexer/-/wikis/jexer-images Jexer image sequence]
* Autumn Lamonte's [https://gitlab.com/klamonte/jexer/-/wikis/jexer-images Jexer image sequence]
* ITerm2's [https://iterm2.com/documentation-images.html#:~:text=Inline%20Images%20Protocol-,Inline%20Images%20Protocol,8%2Dbit%2Dclean%20environment. Image Protocol]
* ITerm2's [https://iterm2.com/documentation-images.html#:~:text=Inline%20Images%20Protocol-,Inline%20Images%20Protocol,8%2Dbit%2Dclean%20environment. Image Protocol]
'''nota bene: this was a learning exercise. as the result ended up looking a good deal like Kovid's protocol (see above), i encourage terminal developers to implement that protocol, as it is a major advance over Sixel. if you want to extend it with things discussed below, hit me up.'''


==Goals as a toolkit developer==
==Goals as a toolkit developer==
Line 38: Line 40:
* ESC (0x1b, 27) starts a new control sequence, terminating any ongoing one. This is necessary to conform to widespread existing behavior, but it is unfortunate, as it means we can't blithely write arbitrary bytes.
* ESC (0x1b, 27) starts a new control sequence, terminating any ongoing one. This is necessary to conform to widespread existing behavior, but it is unfortunate, as it means we can't blithely write arbitrary bytes.
** If we can discard this restriction, we can eliminate the unwieldy escaping in [[#Minimally encoded BGRA|BGRA]], and the biasing in [[#Unencoded greyscale|greyscale]].
** If we can discard this restriction, we can eliminate the unwieldy escaping in [[#Minimally encoded BGRA|BGRA]], and the biasing in [[#Unencoded greyscale|greyscale]].
** Evaluate suggestions against the [https://vt100.net/emu/dec_ansi_parser Williams state machine]
* We mustn't tread on any defined [https://invisible-island.net/xterm/ctlseqs/ctlseqs.html XTerm control sequences].
* We mustn't tread on any defined [https://invisible-island.net/xterm/ctlseqs/ctlseqs.html XTerm control sequences].


Line 62: Line 65:


===Reloads===
===Reloads===
Reloads the specified graphic with new data. Any part of the graphic which is visible <b>must</b> be updated; this update <b>should</b> be performed without flicker. The new data must be the same geometry as the old data, but it needn't be the same format. The entirety of the data must be provided. '''FIXME we'll want some kind of animation-friendly partial reload.''' If the specified graphic does not exist, no action is taken.
Reloads the specified graphic with new data. Any part of the graphic which is visible <b>must</b> be updated; this update <b>should</b> be performed without flicker. The new data must be the same geometry as the old data, but it needn't be the same format. The entirety of the data must be provided. '''FIXME we'll want some kind of animation-friendly partial reload.''' If the specified graphic does not exist, no action is taken. If the provided data is a container, and the container yields geometry different from that associated with the existing graphic, no action is taken.


<i>Parameters: identifier, data format, bulk data</i>
<i>Parameters: identifier, data format, bulk data</i>
Line 188: Line 191:
* There is no filesystem-based data exchange (Kitty, iTerm)
* There is no filesystem-based data exchange (Kitty, iTerm)
* There is no terminal-side scaling (Kitty)
* There is no terminal-side scaling (Kitty)
[[CATEGORY: Terminals]]
[[CATEGORY: Projects]]