ITerm2Image class

Utilities for the iTerm2 Image Protocol.

The escape sequence format is:

ESC ] 1337 ; File = [arguments] : base64-data ST

Arguments are semicolon-separated key=value pairs:

  • name=<base64> — Base64 encoded filename (optional)
  • size=N — File size in bytes (helps the terminal show progress)
  • width=N — Display width: N (cells), Npx (pixels), N% (percent), or "auto"
  • height=N — Display height: same format as width
  • preserveAspectRatio=0|1 — Default 1
  • inline=1 — Must be 1 to display inline (otherwise downloads)

See: https://iterm2.com/documentation-images.html

Constructors

ITerm2Image()

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, {String? name, int? columns, int? rows, bool preserveAspectRatio = true}) String
Encodes an image into iTerm2 Image Protocol escape sequences.
encodePng(List<int> pngBytes, {String? name, int? columns, int? rows, bool preserveAspectRatio = true}) String
Encodes pre-encoded PNG bytes into iTerm2 Image Protocol escape sequences.