Interface TerminalImage

All Known Implementing Classes:
ITermImage, KittyImage, SixelImage

public interface TerminalImage
Represents an image that can be displayed in a terminal. Different implementations handle different terminal image protocols.
  • Method Summary

    Modifier and Type
    Method
    Description
    Encode the image as an escape sequence string ready to be written to the terminal.
    int
    Get the display height in terminal cells.
    Get the protocol used by this image.
    int
    Get the display width in terminal cells.
  • Method Details

    • encode

      String encode()
      Encode the image as an escape sequence string ready to be written to the terminal.
      Returns:
      the escape sequence that will display the image
    • getProtocol

      ImageProtocol getProtocol()
      Get the protocol used by this image.
      Returns:
      the image protocol
    • getWidthCells

      int getWidthCells()
      Get the display width in terminal cells. Returns -1 if width is auto-detected or not specified.
      Returns:
      width in cells, or -1 for auto
    • getHeightCells

      int getHeightCells()
      Get the display height in terminal cells. Returns -1 if height is auto-detected or not specified.
      Returns:
      height in cells, or -1 for auto