TODO
====

If you're particularly interested in any of this, send patches/pull requests
or maybe just prod me a little.

Minor Features/UX
-----------------

- HTML output.
- Symbols: Math.
- Accept image on standard input.
- Accept -o, --output to write to file.
- Verbose output. Show file names.
- Add a --test option to print a test page.
- Add a --show-symbols op to print matching symbols.
- Add a --ping-pong option for animations.
- Strv building API in addition to GString?
- If FG color is transparent, see if we can use an inverted symbol and swap
  with BG.
  - Avoid using transparent foreground due to XFCE Terminal (other terminals?)
    weird handling with background picture set?
    - Except in FGBG modes.
- Optionally use FG colors only, no BG or inverse.
- Test with more terminals.
  - iTerm?
  - Other OSX terminals?
  - PuTTY on Windows 8, 10?
    - Windows 7 fonts support half, solid, some borders.
  - Terminology.
    - Emulate tycat.
  - Kitty (https://sw.kovidgoyal.net/kitty/graphics-protocol.html).
  - Emacs ansi-term.
  - Emacs shell (TERM=dumb).
  - Come up with some kind of support matrix.

Major features
--------------

- Lossy/lossless intra-frame compression. Data rate regulated:
  - By desired output size.
  - By maximum desired per-cell error.
  - By total error?
  - Slide window over row, calculate mean colors, calc error?
- Lossy/lossless delta compression.
  - Double-buffer with a checkpoint call to swap.
    - Dirty map not enough in case each frame is composited in multiple steps.
  - Emit difference between checkpoint state and current.
  - Optimization: Keep a rect or region of changed area.
  - Multiply previous symbol's new error with weight to increase or decrease
    stability (prevent flicker)?
- Allow getting and setting character cells (individual cells and rects).
  - Raw mode (indexed/etc) and RGB conversion mode.
- Drawing context with clip rect/region, etc.
  - Potentially a context stack.
  - Getting into NCurses territory...
- Video playback.
- Interactive UI (may need to be in separate tool).

Optimization
------------

- Avoid ImageMagick for remaining common formats like PNG, JPEG and directly
  use more efficient decoders instead.
- Speed up alpha transparency code path.
- Preload next image/frame in delay phase.
- Don't calculate error if we're only using a single symbol (e.g. vhalf).

The Fine Material
-----------------

- Tips.
  - For scrolling, use e.g. chafa input.jpg -s 200 | less -S
  - Rate-controlled playback with e.g. cat input.txt | pv -qL 100k
  - Playback with awk + proper inter-frame delay.
  - X11 applications in terminal
    1) Xvfb :99 -ac -fbdir t -screen 0 1440x900x24 &
    2) DISPLAY=:99 lament -root &
    3) chafa --watch t/Xvfb_screen0
  - gnome-shell in terminal
    - XDG_SESSION_TYPE=x11 DISPLAY=:99 gnome-shell
    - Run as different user.
  - Using (unreleased) ffmpeg driver:
    - ./ffmpeg -i movie.mkv -pix_fmt rgba -f chafa -color 16 -symbols vhalf,space -fill ascii -
