diff options
| author | bptato <nincsnevem662@gmail.com> | 2024-09-13 22:17:29 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2024-09-13 23:44:51 +0200 |
| commit | e33fe22813e27652bb2d9de2c9f01ccb0376acca (patch) | |
| tree | 1db70220e77e57a2ae1fbdec41cd80c9eb960b4c /doc | |
| parent | a50651c944939b783ea186ef5b109f91368373d0 (diff) | |
| download | chawan-e33fe22813e27652bb2d9de2c9f01ccb0376acca.tar.gz | |
Update docs
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/image.md | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/doc/image.md b/doc/image.md index 14f8f124..a0f8766f 100644 --- a/doc/image.md +++ b/doc/image.md @@ -23,15 +23,15 @@ In most cases, all you need to do is to set "buffer.images" to true; with the default image-mode, Chawan will find the best image display method supported by your terminal. -However, there are terminals (such as yaft) that support an image output -method but do not advertise it (and are therefore left undetected). For -such terminals, you also have to set "display.image-mode" appropriately. +If your terminal does not tell Chawan that it can display sixels, you may also +have to set "display.image-mode" appropriately. See below for further +discussion of sixel configuration. ## Output formats Supported output formats are: -* The DEC SIXEL format +* The DEC Sixel format * The Kitty terminal graphics protocol The former is supported because it's ubiquitiously adopted; the latter @@ -43,6 +43,38 @@ above two anyways.) Support for hacks such as w3mimgdisplay, ueberzug, etc. is not planned. +### Sixel + +Sixel is the most widely supported image format. See <https://arewesixelyet.com> +to find a terminal that supports it. + +Known quirks and implementation details: + +* XTerm needs extensive configuration for ideal sixel support. In particular, + you will want to set the "decTerminalID", "numColorRegisters", + and "maxGraphicSize" attributes. See `man xterm` for details. +* We assume private color registers are supported. On terminals where they + aren't (e.g. SyncTERM or hardware terminals), colors will get messed up with + multiple images on screen. +* We send XTSMGRAPHICS for retrieving the number of color registers; on failure, + we fall back to 256. You can override color register count using the + `display.sixel-colors` configuration value. +* For the most efficient sixel display, you will want a cell height that + is a multiple of 6. Otherwise, the images will have to be re-coded several + times on scroll. +* Normally, Sixel encoding runs in two passes. On slow computers, you can try + setting `display.sixel-colors = 2`, which will skip the first pass. +* Transparency is currently not supported; you will get strange results with + transparent images. + +### Kitty + +On terminals that support it, Kitty is preferred over Sixel. The Kitty +protocol has the benefit that it can reuse images we have sent at least once, +so it is normally more efficient than the former. + +To minimize transfer size, we encode images to PNG before displaying them. + ## Input formats Currently, the supported input formats are: |