Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Konsole Konsole
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 36
    • Merge requests 36
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • UtilitiesUtilities
  • KonsoleKonsole
  • Merge requests
  • !594

Add support for graphics in terminal

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Matan Ziv-Av requested to merge matan/konsole:graphics3 into master Feb 01, 2022
  • Overview 28
  • Commits 11
  • Pipelines 14
  • Changes 11

This merge requests add support for displaying graphics inside the terminal.

The graphics display infrastructure allows adding and removing of images. Each image is anchored at the top left corner to a character cell, and may scroll when text is scrolled, including to the history buffer. Images also have a Z-coordinate, with text having Z=0, so images may be drawn above the text or below.

Three terminal commands (escape sequence) protocols may be used to display graphics:

  • sixel parsing code is based on MR !517 (closed), but using my graphics rendering. I also modified the parsing to be more compliant with the specification (from vt100.net), as well as with xterm's behavior. Imagemagick (lsix) and libsixel (mpv) work, as well as echo -e '\033Pq!255~\033\' ( from the discussion in !517 (closed)).

  • iterm2. Tested with imgcat from there and timg.

  • A protocol based on kitty graphics protocol. Animation and transfer modes other than direct are not supported. In addition to PNG, any graphics format supported by QImage.loadFromData() may be used. Tested with kitty's icat, timg, and the notcurses library (ncplayer, ncls.)

This patch should be considered experimental, but it can already be useful

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: graphics3