Copenhagen

timg – Terminal Image and Video Viewer

In Operation

Here’s an image displayed by timg in a terminal. We’re using the Kitty terminal emulator. As timg supports the Kitty Graphics Protocol, we see the image in its full 24-bit glory.

timg
Click image for full size

Besides support for the Kitty Graphics Protocol, the software can display images with half blocks, quarter blocks, and there’s support for iTerm2 graphics as well. In the image above which is shown using kitty graphics we didn’t need to specify the mode as the software auto-detects graphics.

Images can be displayed in a configurable grid. This is especially handy if you’re looking for a specific image buried among in a directory of many images. In the screenshot below, we’ve chosen a grid of 5 images across. By including the –title option you can see the associated filenames (not shown in the image).

timg - grid view
Click image for full size

There are other command-line options which let us define things like output geometry, scale to fit width, rotate, auto-crop, background colour and more.

timg is a lot more than just an image viewer. It also supports playback of GIF animations. There’s support for upscaling which enlarges images and animations so that they fit the window. Here’s a video of a GIF animation which has been upscaled.

And the icing on the cake is support for playback of video. Videos play once, but it’s possible to define the number of runs through a full cycle, or to stop at a specified time interval.


Summary

timg is an excellent image viewer for the terminal with a good set of features including grid views. It trumps viu in our opinion offering more functionality and better supported for animated GIFs.

Playback of video works well although without support for audio or subtitles, it’s usefulness is somewhat limited.

Website: github.com/hzeller/timg
Support:
Developer: Henner Zeller
License: GNU General Public License v2.0

timg is written in C++. Learn C++ with our recommended free books and free tutorials.

Pages in this article:
Page 1 – Introduction / Installation
Page 2 – In Operation / Summary

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Please read our Comment FAQ before posting a comment.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments