@@ -48,10 +48,10 @@ \section{Motivation} % {{{
4848developers, 30 to 40 years later, have started implementing their own proprietary protocols
4949for displaying images as Sixel was simply not state of the art anymore.
5050
51- While this is positive, it also leads to fragmentation in the ecosystem because application
51+ While this is positive, it also leads to fragmentation in the ecosystem because application
5252developers do not know what to support in case they intend display images.
53- This specification attempts to unify all those image protocols - not as a superset, but rather
54- as a largest common denominator, with implementation adaptability on both ends - terminal and
53+ This specification attempts to unify all those image protocols - not as a superset, but rather
54+ as a largest common denominator, with implementation adaptability on both ends - terminal and
5555application side.
5656
5757% }}}
@@ -65,37 +65,96 @@ \section{Requirements} % {{{
6565 \item Synchronous operations only (no asynchronous operations unless explicitly requested)
6666 \item Aspect ratio must be kept by default (and support customization)
6767 \item Image upload must be decoupled from image display
68- \item Cell-based masking and the ability to render sub-rectangles of the uploaded image
68+ \item Ability to render sub-rectangles of the uploaded image
6969 \item Future-reusability of uploaded images for other uses (such as
7070 icon-display, desktop-notifications, background images)
7171\end {enumerate }
72+
73+ \paragraph* {}
74+
75+ The document at \ref {ref:twg-gip } suggests cell based masking for rendering to help rendering more
76+ complex scenes such as in windowed TUI applications or terminal multiplexers.
77+ However, the same can be achieved with a sequence of Image-Render commands specifying a
78+ sub-rectangle to be rendered of the referenced image.
79+
7280% }}}
7381\section {Prior art and current state } % {{{
7482
7583Prior art of image protocols for terminals are as follows:
7684
85+ \subsection {DEC ReGIS graphics }
86+
87+ \begin {itemize }
88+ \item First appeared in 1981
89+ \item vector graphics based
90+ \item implemented by: xterm
91+ \end {itemize }
92+
93+ \subsection {Sixel graphics }
94+
95+ \begin {itemize }
96+ \item Sixel grpahics first appeared in VT330/VT340 specifications that seems to be published in 1988.
97+ \item It is pixel based and positions the graphics cursor in a way it is most optimal for dot printers,
98+ that could print 6 pixels in height per line.
99+ \item Specialized image format optimized for 6-pin printers.
100+ \item implemented by: xterm, mlterm, wezterm, contour, VTE
101+ \end {itemize }
102+
103+ \subsection {iTerm2 image protocol }
104+
105+ \begin {itemize }
106+ \item Can associate a file name (Base64 encoded) to the rendered image.
107+ \item Image display size can be pixel based as well as cell based.
108+ \item Also has the ability to address the with and hight relative to the terminal window size.
109+ \item Image data is Base64 encoded.
110+ \end {itemize }
111+
112+ \todo {When was iTerm2 image protocol first introduced?}
113+ \todo {iTerm2 supported image formats?}
114+
115+ \subsection {Terminology image protocol }
116+
77117\begin {itemize }
78- \item Sixel graphics (implemented by: xterm, mlterm, wezterm, contour, VTE)
79- \item DEC REGIS graphics (implemented by xterm)
80- \item iTerm2 image protocol (implemented by iTerm2, wezterm)
81- \item Terminology image protocol (implemented by Terminology)
82- \item Kitty image protocol (implemented by kitty)
118+ \item First appeared in ... \todo {When did Terminology's image protocol first appear?}
119+ \item Very hard to find anything out about the underlying transmission protocol.
120+ \item Seems to be file based.
121+ \item No specification available.
83122\end {itemize }
84123
85- \todo {describe each protocols pros/cons shortly}
124+ \subsection {Kitty image protocol }
125+
126+ \begin {itemize }
127+ \item First appeared in 2017
128+ \item Seperates image upload from image display
129+ \item Can mandate image sizes in pixels as well as in grid cell dimensions.
130+ \item Images are rendered independantly of text with a specified Z-axis.
131+ \item Images can be deleted without knowning their names but only by specifying X/Y/Z axis
132+ and delete all images intersecting these criteria.
133+ \item Image formats supported are: RGB, RGBA, PNG.
134+ \item Image data is Base64 encoded.
135+ \item Supports optionally compressing the image data.
136+ \item Supports various image data transmission methods:
137+ \begin {itemize }
138+ \item inline, as part of the VT sequence
139+ \item named shared memory
140+ \item path to local files
141+ \end {itemize }
142+ \item Optionally deletes the local file when requested and the file path is in a secure location.
143+ \item Hard coded image storage pool to 320 MB (per screen buffer).
144+ \end {itemize }
86145
87146% }}}
88147\section {Backwards Compatibility } % {{{
89148
90- Since all other image protocols are pixel based, the proposed image protocol does not
149+ Since all other image protocols are pixel based, the proposed image protocol does not
91150attempt to retain any backwards compatibility. Instead, the goal is to create
92151an image protocol that is future proof with todays needs in mind.
93152
94153% }}}
95154\section {Future Compatibility and Stability } % {{{
96155
97156In order to leave room for improvements, the VT sequences should be designed in a way
98- that allows specifying additional parameters in the future, and simultaneously ensures
157+ that allows specifying additional parameters in the future, and simultaneously ensures
99158that older implementations can still work while safely ignoring any new parameters.
100159
101160% }}}
@@ -112,7 +171,7 @@ \section{Terminal Emulator Requirements} % {{{
112171Upper limits must be present for security reasons but can be varying by implementation.
113172
114173\todo {Have the ability to query resource limits?}
115- \todo {What should happen when the number of images an application wants
174+ \todo {What should happen when the number of images an application wants
116175 to display is higher than the limit?}
117176
118177% }}}
@@ -320,8 +379,8 @@ \section{References} % {{{
320379
321380\begin {enumerate }
322381 \item \label {ref:ctlseqs }https://invisible-island.net/xterm/ctlseqs/ctlseqs.txt
323- \item \label {ref:simple-image-display }Simple Image display, https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/12
324- \item \label {ref:gip }Good Image Protocol, https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/26
382+ \item \label {ref:twg- simple-image-display }Simple Image display, https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/12
383+ \item \label {ref:twg- gip }Good Image Protocol, https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/26
325384 \item \label {ref:image-sixel }Sixel Image Protocol, https://vt100.net/docs/vt3xx-gp/chapter14.html
326385 \item \label {ref:image-item2 }iTerm2's image protocol, https://iterm2.com/documentation-images.html
327386 \item \label {ref:image-terminology }Terminology's image protocol, https://www.enlightenment.org/docs/apps/terminology.md \todo {Terminology image protocol spec not found. ;-(}
@@ -334,4 +393,4 @@ \section{Editorial Notes}
334393
335394\end {document }
336395
337- % vim:ts=2 :sw=2
396+ % vim:ts=4 :sw=4
0 commit comments