+A terminal with cached multimedia feature must support the following new
+sequences:
+
+| Sequence | Command | Description |
+|--------------------------------------|-----------|-------------------------|
+| OSC 1 3 4 0 ; F i l e = {data} BEL | CMCACHE | Display media at (x, y) |
+| OSC 1 3 4 1 ; Pi ; {data} ST | CMDISPLAY | Display media at (x, y) |
+| OSC 1 3 4 2 ; Pi ; Pe ; {data} ST | CMCRESP | Terminal response to CMCACHE |
+| OSC 1 3 4 3 ; Pi ; Pe ; {data} ST | CMDRESP | Terminal response to CMDISPLAY |
+
+
+
+
+Cached Multimedia - CMCACHE
+---------------------------
+
+For the CMCACHE command:
+
+* The {data} is a set of key-value pairs (each pair separated by
+ semicolon (';')).
+
+* A key can be any alpha-numeric ASCII string ('0' - '9', 'A' - 'Z',
+ 'a' - 'z').
+
+* A value is any printable ASCII string not containing whitespace,
+ colon, or semicolon ('!' - '9', '<' - '~').
+
+The keys for the key-value pairs that must be supported by the
+terminal are listed below:
+
+| Key | Default Value | Description |
+|--------------|---------------|----------------------------------------------|
+| type | "image/rgb" | mime-type describing data field |
+| url | "" | If set, a location containing the media data |
+
+
+The "type" value is a mime-type string describing the format of the
+base64-encoded binary data. The terminal must support at mimunum these
+mime-types:
+
+| Type String | Description |
+|---------------|--------------------------------------------------------------|
+| "image/rgb" | Big-endian-encoded 24-bit red, green, blue values |
+| "image/rgba" | Big-endian-encoded 32-bit red, green, blue, alpha values |
+| "image/png" | PNG file data as described by (reference to PNG format) |
+
+A terminal may support additional types. An application can detect
+terminal support for a format by: sending a CMCACHE command, and
+examining the terminal's CMCRESP sequence for success or error.
+
+
+
+Cached Multimedia - CMDISPLAY
+-----------------------------
+
+For the CMDISPLAY command:
+
+* Pi - a non-negative integer media ID that was returned by a CMCRESP
+ response to a previous CMCACHE command.
+
+* The {data} is a set of key-value pairs (each pair separated by
+ semicolon (';')), followed by a colon (':'), followed by a base-64
+ encoded string.
+
+* A key can be any alpha-numeric ASCII string ('0' - '9', 'A' - 'Z',
+ 'a' - 'z').
+
+* A value is any printable ASCII string not containing whitespace,
+ colon, or semicolon ('!' - '9', '<' - '~').
+
+* Any alpha-numeric key may be specified. A key that is not supported
+ by the terminal is ignored without error.
+
+* The multimedia pixels are processed as shown below.
+
+ - The pixel are drawn starting at the upper-left corner of the text
+ cursor position.
+
+ - The screen is never scrolled.
+
+ - The cursor's final position is at the same column and row as the
+ starting cursor position, i.e. the cursor does not move at all.
+
+ - Pixels that would be drawn below the visible region on screen are
+ discarded.
+
+ - Pixels that would be drawn to the right of the visible region on
+ screen are discarded.
+
+
+
+The keys for the key-value pairs that must be supported by the
+terminal are listed below:
+
+| Key | Default Value | Description |
+|--------------|---------------|----------------------------------------------|
+| width | 1 | number of Cells or pixels wide to display in |
+| height | 1 | number of Cells or pixels high to display in |
+| scale | "none" | scale/zoom option, see below |
+| align | "nw" | align image to edge option, see below |
+
+A terminal may support additional keys. If a key is specified but not
+supported by the terminal, then it is ignored without error.
+
+
+
+The "width" and "height" values can take the following forms:
+
+| Value | Meaning |
+|-------------------------------|---------------------------|
+| N (a positive integer) | Number of Cells |
+| Npx (positive integer + "px") | Number of pixels |
+| N% (positive integer + "%") | Percent of screen width or height |
+| "auto" | Number of pixels as defined by the multimedia data |
+
+
+
+The "scale" value can take the following values:
+
+| Value | Meaning |
+|------------|---------------------------------------------------------------|
+| "none" | No scaling along either axis. |
+| "scale" | Stretch image, preserving aspect ratio, to maximum size in the target area without cropping |
+| "stretch" | Stretch along both axes, distorting aspect ratio, to fill the target area |
+| "crop" | Stretch along both axes, preserving aspect ration, to completely fill the target area, cropping pixels that will not fit |
+
+
+
+The "align" value can take the following values:
+
+| Value | Meaning |
+|------------|-----------------------------------------------------------------|
+| "nw" | Media is placed at the top-left corner (northwest) |
+| "n" | Media is placed on the top and centered horizontally (north) |
+| "ne" | Media is placed at the top-right corner (northest) |
+| "w" | Media is placed on the left and centered vertically (west) |
+| "c" | Media is centered in the target area (center) |
+| "e" | Media is placed on the right and centered vertically (east) |
+| "sw" | Media is placed on the bottom-left corner (southwest) |
+| "s" | Media is placed on the bottom and centered horizontally (south) |
+| "se" | Media is placed on the bottom-right corner (southeast) |
+