3939
4040\section {Motivation } % {{{
4141
42- For many decades Sixel and ReGIS have been the only image protocols for decades . While both are
43- ancient and not even widely implemented, newer generations of people seem to be used to see images
42+ For many decades Sixel and ReGIS have been the only image protocols for VTs . While both are
43+ ancient and not even widely implemented, newer generations of people are used to seeing images
4444and even emojis everywhere. Those people may eventually touch a virtual terminal emulator
45- and expect to be it no different than what they were used to by other software systems.
45+ and expect to be it no different than what they are used to in other software systems.
4646
47- There is a rise of interest in both of these fields, and thus, many virtual terminal emulator
48- developers, 30 to 40 years later, have started implementing their own propriaty protocols
49- for displaying images as Sixel was purely not state of the art anymore.
47+ There is growing interest in both of these fields, and thus, many virtual terminal emulator
48+ developers, 30 to 40 years later, have started implementing their own proprietary protocols
49+ for displaying images as Sixel was simply not state of the art anymore.
5050
51- This is good and bad. Because application developers do not know what to support now in case they
52- intend display images. This specification attempts to unify all those image protocols - not
53- as a superset, but rather as a largest common denominator of all, with implementation adaptability
54- on both ends in mind, terminal and application side.
51+ While this is positive, it also leads to fragmentation in the ecosystem because application
52+ developers 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
55+ application side.
5556
5657% }}}
5758\section {Requirements } % {{{
@@ -62,16 +63,16 @@ \section{Requirements} % {{{
6263 \item Grid cells as the only unit size except for the actual image to be uploaded
6364 \item Remote-terminal capable (no dependency on the local host, such as the local file system)
6465 \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
66+ \item Aspect ratio must be kept by default (and support customization)
67+ \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
69+ \item Future-reusability of uploaded images for other uses (such as
6970 icon-display, desktop-notifications, background images)
7071\end {enumerate }
7172% }}}
7273\section {Prior art and current state } % {{{
7374
74- Prior art of image protocols for the terminal are the following :
75+ Prior art of image protocols for terminals are as follows :
7576
7677\begin {itemize }
7778 \item Sixel graphics (implemented by: xterm, mlterm, wezterm, contour, VTE)
@@ -86,16 +87,16 @@ \section{Prior art and current state} % {{{
8687% }}}
8788\section {Backwards Compatibility } % {{{
8889
89- Since all other image protocols are pixel based, this image protocol does not retain any
90- backwards compatibility nor attempts to do that . Instead, the goal is to create
90+ Since all other image protocols are pixel based, the proposed image protocol does not
91+ attempt to retain any backwards compatibility . Instead, the goal is to create
9192an image protocol that is future proof with todays needs in mind.
9293
9394% }}}
9495\section {Future Compatibility and Stability } % {{{
9596
96- In order to leave room for improvements, the actual VT sequences should be designed in a way
97- that they allow specifying additional parameters in the future, and that older implementations
98- can still work with safely ignoring any new parameters.
97+ In 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
99+ that older implementations can still work while safely ignoring any new parameters.
99100
100101% }}}
101102\section {Terminal Emulator Requirements } % {{{
@@ -111,6 +112,8 @@ \section{Terminal Emulator Requirements} % {{{
111112Upper limits must be present for security reasons but can be varying by implementation.
112113
113114\todo {Have the ability to query resource limits?}
115+ \todo {What should happen when the number of images an application wants
116+ to display is higher than the limit?}
114117
115118% }}}
116119\section {Performance Considerations } % {{{
@@ -135,50 +138,50 @@ \subsection{Upload Image}
135138Uploads an image for future render operations.
136139
137140\begin {itemize }
138- \item Id; a unique Id identifying the uploaded image
139- \item format; an unique ID that identifies an image format. See section \ref {sec:supported-image-formtats }
141+ \item Id; a unique identifier for the uploaded image
142+ \item format; a value that determines the image format. See section \ref {sec:supported-image-formtats }
140143 \item data; image data in the given input format
141144 \item width; optional pixel width of the given image (only required for RGB/RGBA format)
142145 \item height; optional pixel height of the given image (only required for RGB/RGBA format)
143146\end {itemize }
144147
145148\subsubsection {Idempotency }
146149
147- Image upload can be implemented idempotent, i.e. the storage pool keeps an internal hash
150+ Image upload can be implemented to be idempotent, i.e. the storage pool keeps an internal hash
148151of each image that is automatically constructed upon image upload.
149- If the image was already uploaded, that image's reference count is incremented instead
150- and in case of a named resource, that one will point to that existing one.
152+ If the image was already uploaded, that image's reference count is incremented
153+ and in case it is a named resource, that one will point to that existing one.
151154
152155\subsubsection {Storage Management }
153156
154157Uploaded images are reference counted. Uploading a named image will initialize its reference count to 1.
155158
156- When uploading an image beyond the above storage pool guarantees,
157- the host may choose at actively evict older images in either priority:
159+ When uploading an image would exceed the storage pool's guarantees,
160+ the host may choose to actively evict older images in either priority:
158161
159162\begin {enumerate }
160163 \item oldest first, or
161164 \item least reference counted (in visible area) first.
162165\end {enumerate }
163166
164- Evicted images that where still held in grid cells may display unicode object replacement
167+ Evicted images that were still held in grid cells may display a unicode object replacement
165168codepoint (U+FFFC) or an empty cell.
166169
167- Displaying an image results in incrementing the reference count by the number of grid cells
170+ Displaying an image results in incrementing the reference counter by the number of grid cells
168171that are holding parts of the image.
169172
170173Clearing a grid cell holding an image fragment (e.g. by overwriting or deleting its contents)
171- will decrement the image reference count .
174+ will decrement the image reference counter .
172175
173- When no grid cell is holding a reference to the underlying image,
174- the corresponding reference count should be either 1 (if uploaded in a separate step)
176+ When no grid cell is holding a reference to the image,
177+ the corresponding reference counter should be either 1 (if uploaded in a separate step)
175178or 0 (if uploaded within the render instruction).
176179
177- Releasing the image by Id will simply decrement is reference count .
180+ Releasing the image by its Id will simply decrement its reference counter .
178181
179182\subsection {Render Image }
180183
181- Renders an image that has either been previously uploaded already and thus is being referenced
184+ Renders an image that has either been previously uploaded and thus is being referenced
182185with a unique Id, or with the image data provided inline.
183186
184187Providing an upload Id along with inline image data is invalid.
@@ -187,10 +190,10 @@ \subsection{Render Image}
187190 \item Id; unique identifier referencing a previously uploaded image
188191 \item grid-width; number of grid cells to render horizontally
189192 \item grid-height; number of grid cells to render vertically
190- \item resizePolicy; optional, mandates how to resize the image within the (default NoResize)
193+ \item resizePolicy; optional, mandates how to resize the image within the grid cells (default NoResize)
191194 \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)
195+ \item image-x-offset; optional, start rendering at the given pixel x-offset cell of the image (default 0)
196+ \item image-y-offset; optional, start rendering at the given pixel y-offset cell of the image (default 0)
194197 \item image-width; optional, number of pixels of the image's width to display (default: max width)
195198 \item image-height; optional, number of pixels of the image's height to display (default max height)
196199 % \item status: optional, request a success/failure status response from the terminal, by default
@@ -200,10 +203,10 @@ \subsection{Render Image}
200203\subsection {Upload and Render Image }
201204
202205An image can be uploaded and rendered within a single instruction.
203- The image is being released automatically right after and therefore cannot be referenced after
206+ The image is being released automatically right after and therefore cannot be referenced
204207again.
205208
206- The parameters of this function is the sum of image upload and image render minus the unique
209+ The parameters of this function is the sum of the image upload and image render parameters excluding the unique
207210identifier.
208211
209212\subsection {Release Image }
@@ -217,7 +220,7 @@ \subsection{Release Image}
217220\subsection {Feature Detection }
218221
219222\DA is already used to advertise terminal features, including sixel graphics, and thus,
220- could be used to also advertise for the \GoodImageProtocol .
223+ could be used to also advertise the availability of \GoodImageProtocol .
221224
222225There is some improved feature detection specification work ongoing,
223226so there may be other ways to detect \GoodImageProtocol in the future, when that is ready.
@@ -255,7 +258,7 @@ \subsection{Upload Image}
255258 \hline
256259\end {tabular }
257260
258- The payload's format is mandated by the \verbatim {fmt}'s value. However, since it must not contain
261+ The payload's format is mandated by the \code {fmt}'s value. However, since it must not contain
259262any C0 or C1 escape codes, the transport is further protected by encoding it via Base64.
260263
261264\subsection {Render Image }
0 commit comments