Check out my first novel, midnight's simulacra!

Sixel: Difference between revisions

From dankwiki
Line 8: Line 8:


==Support==
==Support==
* <tt>xterm</tt> supports scrolling sprixels when compiled with <tt>--enable-sixel-graphics</tt> and launched with at least a <tt>vt340</tt> <tt>decGraphicsID</tt> (or <tt>decTerminalID</tt>).
* <tt>xterm</tt> supports scrolling sprixels when compiled with <tt>--enable-sixel-graphics</tt>
** and launched with at least a <tt>vt340</tt> <tt>decGraphicsID</tt> (or <tt>decTerminalID</tt>)
* <tt>mlterm</tt> works
* <tt>mlterm</tt> works
* <tt>alacritty</tt> has a patch outstanding to add support, but it is not yet merged as of 0.8.0-dev
* <tt>alacritty</tt> has a patch outstanding to add support, but it is not yet merged as of 0.8.0-dev
* <tt>VTE</tt> supports sprixels when built with <tt>-Dsixel=true</tt>.
* <tt>VTE</tt> supports sprixels when built with <tt>-Dsixel=true</tt>


==See also==
==See also==
* [[Notcurses]] supports sixel intermingled with standard TUI elements
* [[Notcurses]] supports sixel intermingled with standard TUI elements
* [https://github.com/saitoha/libsixel libsixel] is pretty complete
* [https://github.com/saitoha/libsixel libsixel] is pretty complete

Revision as of 23:15, 1 March 2021

Sixel ("six pixels") does not appear to have any true, up-to-date "standard". It seems to have been introduced on DEC printers, and made its first glass appearance on the VT125, though the VT3xx documentation gets the most play (the VT340 appears to have been the first terminal which could sensibly scroll pixel graphics). A single sixel combines a set of programmable color registers with a vertical stack of six pixels; a sixel sprite (sprixel?) is MxN pixels where N is a multiple of 6. It is probably the most widely implemented method of pixel graphics for terminal emulators (kitty has its own protocol, as does ITerm2). ReGIS is a similar method for vector graphics. A single horizontal strip of sixels is a "band"; a sprixel has one or more bands.

A sprixel must typically be emitted as a single unit to be rendered as a coherent whole (i.e. without gaps between bands). Sprixels do not annihilate entire cells, but only the pixels covered. A glyph emitted atop a sixel will annihilate all pixels contained within the cell.

Color registers

A terminal supports some number of color registers for each sprixel. For xterm, this is controlled by the numColorRegisters resource (set to a (low) value based off decTerminalID if not explicitly provided):

XTerm*numColorRegisters: 1024

Support

  • xterm supports scrolling sprixels when compiled with --enable-sixel-graphics
    • and launched with at least a vt340 decGraphicsID (or decTerminalID)
  • mlterm works
  • alacritty has a patch outstanding to add support, but it is not yet merged as of 0.8.0-dev
  • VTE supports sprixels when built with -Dsixel=true

See also

  • Notcurses supports sixel intermingled with standard TUI elements
  • libsixel is pretty complete