Skip to content

zhaojinzhou/tiv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

编译和使用

centos 7

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum update
yum install vala-devel gtk2-devel  libjpeg-devel

stiv-jpg 1.jpg 256

ubuntu

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 [email protected]

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

About

terminal image viewer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vala 56.1%
  • C 36.3%
  • Makefile 5.5%
  • Shell 2.1%