terminal image viewer
Vala C Makefile Shell
Failed to load latest commit information.
img Initial import of tiv, the terminal image viewer Jan 9, 2013
test
LICENSE Initial import of tiv, the terminal image viewer Jan 9, 2013
Makefile Initial working stiv-jpeg C rewrite Feb 4, 2013
README.md Add --truecolor in vala's tiv Oct 23, 2015
TODO.md Initial working stiv-jpeg C rewrite Feb 4, 2013
stiv-jpeg.c Add --truecolor in vala's tiv Oct 23, 2015
stiv.c Add --truecolor in vala's tiv Oct 23, 2015
tiv.vala

README.md

tiv: the terminal image viewer

Tiv implements its own rendering algorithms to display pictures loaded with the Gdk library to the terminal using ascii art and ansi256 in color and grayscale.

This program has been written for fun, the code is ugly but it will be cleaned up and refactorized into a library probably in the future.

kodim* images under the img/ directory are 24bit test images from kodak and are freely available for unrestricted here: http://r0k.us/graphics/kodak/

stiv

Stiv is the suckless reimplementation in plain C, bitmaps should be provided in rgb24 form and width/height are passed as arguments:

$ tiv -d foo.img > .bitmap 2> .size
$ stiv `cat .size` < .bitmap

Author

This program has been released on Jan 2013 by pancake Contact addresses are: @trufae and pancake@nopcode.org

Supported terminals

              ascii    ansi    grey   256
iTerm2          x       x       x      x
OSX Terminal    x       x       -      -
xterm           x       x       x      x
st              x       x       x      x

Usage

Using the Vala implementation:

$ ./tiv -s 40 -t img/kodim15.jpg

Using the suckless C implementation:

$ ./stiv-jpeg
stiv-jpeg . suckless terminal image viewer
Usage: stiv [image] [width] [mode]
Modes: [ascii,ansi,grey,256,rgb]

$ ./stiv-jpeg img/kodim15.jpg 50

Example

original picture

original

ascii

ascii

ansi

ansi

grey

grey

256

256