33\usepackage [english ]{babel }
44
55\usepackage {colortbl }
6- \usepackage {fancyhdr }
7- \usepackage {graphicx }
8- \usepackage {hhline }
9- \usepackage {todonotes }
106\usepackage {hyperref }
7+ \usepackage {todonotes }
8+
9+ % \usepackage{fancyhdr}
10+ % \usepackage{graphicx}
1111
1212\usepackage {xcolor }
1313\definecolor {light-gray}{gray}{0.95}
1818\title {VT Good Image Protocol \\
1919a standardization proposal}
2020\author {Christian Parpart}
21- \date {2020-11-25 (draft, revision 0)}
21+ \date {2020-12-13 (draft, revision 0)}
2222
2323\newcommand {\code }[1]{\colorbox {light-gray}{\texttt {#1 }}}
2424
25+ \newcommand {\DA }{\code {DA}}
2526\newcommand {\DECRQM }[1]{\code {CSI ? #1 \$ p}}
26- \newcommand {\DECSET }[1]{\code {CSI ? #1 h}}
2727\newcommand {\DECRST }[1]{\code {CSI ? #1 l}}
28-
29- \newcommand {\DA }{\code {DA}} % DA
30-
31- % \newcommand\VtModeNum{2027} % Grapheme cluster mode Id
32- % \newcommand{\GCON}{\DECSET{\VtModeNum{}}} % DECSM for enabling grapheme cluster processing
33- % \newcommand{\GCOFF}{\DECRST{\VtModeNum{}}} % DECRM for disabling grapheme cluster processing
34- % \newcommand{\GCTEST}{\DECRQM{\VtModeNum{}}} % DECRQM for requesting current grapheme cluster processing mode
28+ \newcommand {\DECSET }[1]{\code {CSI ? #1 h}}
3529
3630\newcommand {\GoodImageProtocol }{\code {Good Image Protocol}}
3731
@@ -59,6 +53,21 @@ \section{Motivation} % {{{
5953as a superset, but rather as a largest common denominator of all, with implementation adaptability
6054on both ends in mind, terminal and application side.
6155
56+ % }}}
57+ \section {Requirements } % {{{
58+
59+ \begin {enumerate }
60+ \item Headless, multi-headed.
61+ \item Deterministic emulation.
62+ \item Grid cells as the only unit size except for the actual image to be uploaded
63+ \item Remote-terminal capable (no dependency on the local host, such as the local file system)
64+ \item Synchronous operations only (no asynchronous operations unless explicitly requested)
65+ \item Aspect ratio must be kept by default (support customization though)
66+ \item Image upload is decoupled from image display
67+ \item Cell-based masking on display or at the ability to render sub-rectangles of the uploaded image
68+ \item Future-reusability of uploaded images for other uses should be possible (such as
69+ icon-display, desktop-notifications, background images)
70+ \end {enumerate }
6271% }}}
6372\section {Prior art and current state } % {{{
6473
@@ -69,7 +78,7 @@ \section{Prior art and current state} % {{{
6978 \item DEC REGIS graphics (implemented by xterm)
7079 \item iTerm2 image protocol (implemented by iTerm2, wezterm)
7180 \item Terminology image protocol (implemented by Terminology)
72- \item Kitty propriaty (implemented by kitty)
81+ \item Kitty image protocol (implemented by kitty)
7382\end {itemize }
7483
7584\todo {describe each protocols pros/cons shortly}
@@ -89,27 +98,20 @@ \section{Future Compatibility and Stability} % {{{
8998can still work with safely ignoring any new parameters.
9099
91100% }}}
92- \section {Requirements } % {{{
101+ \section {Terminal Emulator Requirements } % {{{
93102
94- \begin {enumerate }
95- \item Headless, multi-headed.
96- \item Deterministic emulation.
97- \item Grid cells as the only unit size except for the actual image to be uploaded
98- \item Remote-terminal capable (no dependency on the local host, such as the local file system)
99- \item Synchronous operations only (no asynchronous operations unless explicitly requested)
100- \item Aspect ratio must be kept by default (support customization though)
101- \item Image upload is decoupled from image display
102- \item Cell-based masking on display or at the ability to render sub-rectangles of the uploaded image
103- \item Future-reusability of uploaded images for other uses should be possible (such as
104- icon-display, desktop-notifications, background images)
105- \end {enumerate }
103+ This is the list of resource requirements that must be guaranteed by the virtual terminal emulator.
106104
107105\begin {enumerate }
108- \item at least 16 images displayable concurrently
106+ \item at least 32 images displayable concurrently
109107 \item at least 4 MB per image uncompressed
110- \item at least 64 MB per storage pool (4*16)
111- \item upper limits must be present but can be varying by implementation
108+ \item at least 128 MB per storage pool (\( 4 * 32\) )
112109\end {enumerate }
110+
111+ Upper limits must be present for security reasons but can be varying by implementation.
112+
113+ \todo {Have the ability to query resource limits?}
114+
113115% }}}
114116\section {Performance Considerations } % {{{
115117
@@ -133,12 +135,11 @@ \subsection{Upload Image}
133135Uploads an image for future render operations.
134136
135137\begin {itemize }
138+ \item Id; a unique Id identifying the uploaded image
136139 \item format; an unique ID that identifies an image format. See section \ref {sec:supported-image-formtats }
137140 \item data; image data in the given input format
138- \item Id; an uniquily identifiable identifier
139- % name in Java-style reverse dot notation,
140- % such as \code{org.binutils.ls} for the standard \code{ls} executable
141- % from the \code{binutils} package.
141+ \item width; optional pixel width of the given image (only required for RGB/RGBA format)
142+ \item height; optional pixel height of the given image (only required for RGB/RGBA format)
142143\end {itemize }
143144
144145\subsubsection {Idempotency }
@@ -184,14 +185,14 @@ \subsection{Render Image}
184185
185186\begin {itemize }
186187 \item Id; unique identifier referencing a previously uploaded image
187- \item image-x-offset; start render at given pixel x-offset cell of the image
188- \item image-y-offset; start render at given pixel y-offset cell of the image
189- \item image-width; optional, number of pixels of the image's width to display
190- \item image-height; optional, number of pixels of the image's height to display
191188 \item grid-width; number of grid cells to render horizontally
192189 \item grid-height; number of grid cells to render vertically
193- \item resizePolicy; mandates how to resize the image within the
194- \item alignmentPolicy; mandates how to align the image within the grid cells
190+ \item resizePolicy; optional, mandates how to resize the image within the (default NoResize)
191+ \item alignmentPolicy; optional, mandates how to align the image within the grid cells (default: MiddleCenter)
192+ \item image-x-offset; optional, start render at given pixel x-offset cell of the image (default 0)
193+ \item image-y-offset; optional, start render at given pixel y-offset cell of the image (default 0)
194+ \item image-width; optional, number of pixels of the image's width to display (default: max width)
195+ \item image-height; optional, number of pixels of the image's height to display (default max height)
195196 % \item status: optional, request a success/failure status response from the terminal, by default
196197 % no status result will be sent back to the client application.
197198\end {itemize }
@@ -248,7 +249,9 @@ \subsection{Upload Image}
248249 parameter & Key & Value \\
249250 \hline
250251 Id & 1 & UInt32 \\
251- fmt & 2 & UInt32 \\
252+ fmt & 2 & enum (see section \ref {sec:supported-image-formtats }) \\
253+ width & 3 & Uint32 \\
254+ height & 4 & Uint32 \\
252255 \hline
253256\end {tabular }
254257
0 commit comments