SixelData
Namespace: Hex1b
Assembly: Hex1b.dll
Immutable data containing Sixel graphics information.
public sealed class SixelDataInheritance
Object → SixelData
Properties
HeightInCells
Gets the height of the Sixel image in cells.
Returns: Int32
public int HeightInCells { get; }Payload
Gets the raw Sixel DCS sequence (ESC P ... ESC ).
Returns: String
public string Payload { get; }PixelHeight
Gets the height of the Sixel image in pixels.
Returns: Int32
public int PixelHeight { get; }PixelWidth
Gets the width of the Sixel image in pixels.
Returns: Int32
public int PixelWidth { get; }WidthInCells
Gets the width of the Sixel image in cells.
Returns: Int32
public int WidthInCells { get; }Methods
GetCellSpan(CellMetrics)
Gets the cell span for this sixel using the specified cell metrics.
Parameters:
metrics(CellMetrics): The cell metrics to use for conversion.
Returns: ValueTuple<Int32, Int32>
The width and height in cells.
public (int Width, int Height) GetCellSpan(CellMetrics metrics)GetPixels()
Decodes the sixel payload to a pixel buffer. The result is cached for subsequent calls.
Returns: SixelPixelBuffer
The decoded pixel buffer, or null if decoding fails.
public SixelPixelBuffer? GetPixels()Remarks
Sixel data is content-addressable: identical payloads share the same instance. This deduplicates memory when the same image appears in multiple cells or is re-rendered.
The raw DCS sequence is stored so it can be re-emitted during rendering. Pixel dimensions are parsed from the raster attributes in the payload.