Skip to content

SixelDecoder

Namespace: Hex1b.Automation

Assembly: Hex1b.dll

Decodes Sixel graphics data to raw pixel arrays for SVG rendering.

csharp
public static class SixelDecoder

Inheritance

ObjectSixelDecoder

Methods

Decode(string, int, int)

Decodes a Sixel DCS payload to raw RGBA pixel data.

Parameters:

  • payload (String): The Sixel payload (including or excluding DCS wrapper).
  • cellWidth (Int32): The width of a terminal cell in pixels.
  • cellHeight (Int32): The height of a terminal cell in pixels.

Returns: SixelImage

Decoded image with RGBA pixel data, or null if decoding fails.

csharp
public static SixelImage? Decode(string payload, int cellWidth = 9, int cellHeight = 18)

Remarks

Sixel is a graphics format where each "sixel" represents a column of 6 vertical pixels. The data includes a color palette definition followed by sixel character data.

This decoder is used to convert sixel data embedded in terminal snapshots into images that can be embedded in SVG output for visual testing.

Released under the MIT License.