-
Notifications
You must be signed in to change notification settings - Fork 65
/
TODO
95 lines (86 loc) · 3.43 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
TODO
====
If you're particularly interested in any of this, send patches/pull requests
or maybe just prod me a little.
Minor Features/UX
-----------------
- Accept -o, --output to write to file.
- Verbose output. Show file names. Call it --annotate.
- Add a --test option to print a test page.
- Add a --show-symbols op to print matching symbols.
- 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.
- Test with more terminals.
- PuTTY on Windows 8, 10?
- Windows 7 fonts support half, solid, some borders.
- Terminology.
- Emulate tycat.
- Emacs ansi-term.
- Emacs shell (TERM=dumb).
- Come up with some kind of support matrix.
- More symbols/symbol aliases:
- CP437.
- Output to retro art formats:
- RexPaint.
- lvllvl.com.
- CharPad/CharPad Pro.
- Marq's PETSCII Editor (http://www.kameli.net/marq/?page_id=2717).
- PabloDraw.
- ANSILove (direct to .ANS, other formats?).
- Others?
- More image loaders:
- BMP. The GIMP has a fairly complete decoder.
- XPM. https://en.wikipedia.org/wiki/X_PixMap
- PBM, PGM, PPM. https://en.wikipedia.org/wiki/Netpbm
- Run image decoders (and Chafa backend?) in sandboxed subprocess.
- "Auto" modes for ChafaCanvasMode and ChafaPixelMode.
Major features
--------------
- Selection from multiple internal named font bitmap sets (IBM, C64, etc).
- Custom palettes.
- External (e.g. in GIMP format, or extract from image) or named internal.
- Using different palettes for BG and FG allows for retro modes like the
C64's Extended Color Character Mode (ECM).
- Pixmap export (raw image buffer from backend, PNG or TIFF export in frontend).
- 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)?
- 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
------------
- 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
$ Xvfb :99 -ac -fbdir t -screen 0 1440x900x24 &
$ DISPLAY=:99 lament -root &
$ 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 -
- Compact listing of icons:
$ montage -tile 6x -background none -geometry 64x64+1+1 /usr/share/icons/Mint-X/*/16/*.png - \
| chafa -s 80