A C++ program that displays images directly in modern terminals using RGB ANSI codes and Unicode block graphics.
Terminal Image Viewer (tiv) is a lightweight C++ tool that renders images directly in terminal emulators. It uses RGB ANSI color codes and Unicode block characters to approximate images with higher resolution than typical half-block methods, making it useful for viewing images in command-line environments without a graphical interface.
Developers and system administrators working in terminal-only environments, such as remote servers or minimal GUI setups, who need to view images directly in the command line. It's also for C++ developers looking to integrate terminal-based image rendering into their applications via its library API.
Developers choose tiv for its higher-resolution rendering algorithm that maps 4x8 pixel cells to optimized Unicode block graphics characters, providing better detail than standard half-block methods. It's dependency-light, cross-platform, and offers both a command-line tool and a C++ API for integration.
Small C++ program to display images in a (modern) terminal using RGB ANSI codes and unicode block graphics characters
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Maps 4x8 pixel cells to optimized Unicode block characters for better detail than half-block methods, with a visible difference shown in comparison images using the -0 option.
Works on Linux, macOS, and Windows with support for compilers like g++, MSVC, and Apple Clang, as noted in the README's installation and news sections.
Prioritizes algorithmic optimization over heavy dependencies, keeping the codebase simple and performant, as stated in the philosophy.
Provides tiv_lib.h for C++ developers to embed terminal image rendering via the CharData function, enabling custom applications.
Requires ImageMagick for image processing, which adds an external dependency and can complicate installation, as highlighted in the troubleshooting section.
Rendering quality depends on terminal features; common problems include wrong colors (needing -256 flag) and line spacing distortions that require terminal adjustments.
Building from source has platform-specific quirks, such as extra flags on Linux (LDLIBS=-lstdc++fs) and reliance on Unix headers or Windows.h, making setup non-trivial.