SixelImage class

Utilities for Sixel Graphics.

Sixel is a bitmap graphics format for terminals that encodes images in 6-pixel high horizontal strips. Each column of 6 vertical pixels is represented as a single ASCII character (value 63–126, where bits 0–5 map to top-to-bottom pixels).

The format uses:

  • Color definitions: #<index>;2;<r>;<g>;<b> (r, g, b are 0–100)
  • Sixel data: ASCII characters 63–126 where bits 0–5 represent pixels
  • RLE compression: !<count><char> for repeated characters
  • Navigation: $ returns to start of strip, - moves to next strip

See: https://en.wikipedia.org/wiki/Sixel

Constructors

SixelImage()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

encode(Image image, {int maxColors = maxPaletteSize}) String
Encodes an image into Sixel escape sequences.
encodeResized(Image image, {required int columns, required int rows, int cellPixelWidth = 8, int cellPixelHeight = 16, int maxColors = maxPaletteSize}) String
Encodes an image with resizing to fit the given cell dimensions.

Constants

maxPaletteSize → const int
Maximum number of colors allowed in a Sixel palette.