#Terminal Graphics v0.6
Display image and video on terminal
terminal need support of 24k color.
tested terminal: urxvt+tmux, xterm, tilda, kitty, alacritty, linux console(is not 24k, set pattern to ascii).
failed: urxvt if not build with 24k support or without tmux.
- 0.5 complete seeking support
- 0.4 remove dbg log, begin sekking support
- 0.3 only -i for view tgi
- 0.2 aur
- 0.1 start release
- 0.0.0 begin of crazy
EasyFramework
$ yay -S terminalgraphics
$ meson build
$ cd build
$ ninja
$ sudo ninja install
tg can display png,jpeg,bmp,svg,gif and all video on your terminal.
to do this it needs some information which is also difficult to obtain automatically, the software need of 3 principal arguments
-f --fonts
this argument set font use on your terminal, for example I use Source code Pro, is very hard to get current font used in automatic mode.
-F --fallback
this argument set fallbackfont, the fallback font is secondary font used when first font not have some glyph, for example I use Symbola.
-s --size
this argument set font size.
-c --convert
tell software to convert image/video to output.
-i --input
an input file.
-o --output
output file, if no output file is select display image directly on stdout, video not support stdout and need output file.
-a --aspect
select aspect ratio -1 no scale, 0 auto, 1 width, 2 height.
-r --raw
tell a software to save image in only text format, this not works with gif or video, with this format can display image with cat,
-p --patterns
change pattern glyph
-S --seek
start video at seconds in double value, only for video
-d --durate
select durate of conversion, at seconds in double value, only for video
try conversion with no extra arguments
$ tg -ci image.png
if output in not realy good can try to add more flags
display image.png on terminal.
$ tg --fonts 'Source Code Pro' --fallback 'Symbola' --size 11 --convert --input image.png
save image.png on image.txt and display, this works only with images jpeg,gif,svn,png.
$ tg -f 'Source Code Pro' -F 'Symbola' -s 11 -c -i image.png -r -o image.txt
$ cat image.txt
save image.png on image.tgi and display.
$ tg -cfFsio 'Source Code Pro' 'Symbola' 11 image.png image.tgi
$ tg -i image.tgi
display image with no unicode character
$ tg -cfFspi 'Source Code Pro' 'Symbola' 11 ' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVXYZ/.,;:!@#%^$&*()_-+=[]{}|' image.png