InlineImage class final

One inline image's content, off the cell grid, content-addressed by id. The grid carries Cell.overlay cells over the placement region; presenters read the bytes from here. Geometry (where and how big) is NOT here — it belongs to the placement, since the same bytes can appear at several sizes/positions in one frame.

sourceWidth/sourceHeight are the decoded pixel dimensions, needed by terminal presenters to resolve aspect-preserving fits without decoding bytes (the core cannot decode PNG). pixels is an optional lazy provider of the decoded RGBA pixels (row-major, 4 bytes per pixel, sourceWidth×sourceHeight) — required only by presenters that must re-rasterize (Sixel); browser surfaces never call it.

Constructors

InlineImage({required String id, required Uint8List bytes, int? sourceWidth, int? sourceHeight, Uint8List pixels()?, Uint8List croppedBytes(int x, int y, int width, int height)?})
const

Properties

bytes → Uint8List
final
croppedBytes → Uint8List Function(int x, int y, int width, int height)?
Lazily encodes a source-pixel crop as PNG bytes. Most presenters can express a crop directly (Kitty) or rasterize from pixels (Sixel), but iTerm2's inline-image protocol cannot. Image providers that already own a decoded bitmap can supply this without making the rendering core learn how to decode or encode PNGs.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
final
pixels → Uint8List Function()?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceHeight → int?
final
sourceWidth → int?
final

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