• Stars
    star
    316
  • Rank 128,520 (Top 3 %)
  • Language
    C
  • Created about 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Show any image in a terminal window.

imcat

Preview any size image in a terminal window.

imcat tiger

Platform

Supports Linux, MacOS and Microsoft Windows 10 terminals.

Introduction

Do you ever find yourself logged into a server, over SSH, but there is no X11 connection. And you want to see the contents of an image?

imcat to the rescue!

imcat is a 24-bit image viewer that uses ANSI terminal colours to display any image supported by STB. It automatically resizes to the width of your terminal, using proper sampling kernels.

imcat also works on the latest version of Windows 10.

Usage

$ imcat file1 [file2 .. fileN]

If you want to blend the image with the terminal background, then you need to specify the background color of your terminal. For instance:

$ export IMCATBG="#dad9cc"

Todo

  • Handle alpha-transparency. Requires reading the terminal background colour, somehow. Tricky.

Done

  • Correct for aspect ratio of terminal font.

Building

Unix

On Linux, just use 'make' to build the imcat binary.

Windows 10

On Windows, you need clang.exe from Visual Studio 2017 to build the imcat.exe binary. It's actually quite hard to get that compiler working, so you may just as well grab the pre-built imcat.exe binary.

License

Authors

Bram Stolk.

stb_image.h is by Sean Barrett et al.

Acknowledgements

A shout out to Frogtoss for the idea and help. Thanks!

Gallery

Sample use

More Repositories

1

GPGOAP

General Purpose Goal Oriented Action Planning
C
554
star
2

chiaharvestgraph

Graphs the activity of a chia harvester in a linux terminal.
C
205
star
3

diskgraph

Graphs the disk IO in a linux terminal.
C
195
star
4

sotrace

Traces the shared-object dependencies of a binary, and graphs them.
Python
151
star
5

energygraph

Graphs the energy use of a host inside a text terminal, using intel-rapl data from the /sys filesystem.
C
124
star
6

ThreadTracer

Lightweight inline profiler that measures wall-time, cpu-time and premptive context switches for threads.
C
72
star
7

ifgraph

Network Interface Grapher.
C
66
star
8

chiaplotgraph

Chia Plot Graph
C
55
star
9

forvor

Fortune's Voronoi Generator
C
31
star
10

sino

sino - a Simplex Noise implementation in C.
C
30
star
11

freqtop

Monitor for the CPU Frequency Scaling under Linux.
C
29
star
12

dutch-blunt

Low poly font rendering system. Uses triangles not textures, for always sharp edges.
C
15
star
13

icmp_watch

Send batch requests for ICMP and show results in a console window to monitor availability of hosts.
C
14
star
14

turboledz

Daemon for Turbo LEDz devices.
C
12
star
15

chiaheightgraph

Graphs the progress of block height in your Chia Full Node.
C
9
star
16

ip2ensign

Converts an IP number to a flag image in a texture atlas.
Python
8
star
17

GBase

Minimalistic Basis for Game Development.
C++
8
star
18

allrgb

My entry for the allRGB challenge: image where each 24b colour is used for one pixel, and one pixel only.
C
6
star
19

MinimalVulkanCompute

Minimal code to do vulkan compute.
C
6
star
20

hidscan

Scan for HID devices, and print out their usages.
C
5
star
21

little_kiss_fft

A port of KISS FFT that targets μcontrollers.
C
4
star
22

objsplitv

Splits Wavefront OBJ vertices that suffer from inappropriate sharing.
Python
4
star
23

hsvbench

Benchmarking HSV to RGB conversions.
C
3
star
24

no-noise-android

Filters out the noisiest spam from the device log of Android devices.
Python
2
star
25

colourfactory

Generates distinct colours.
Python
2
star
26

Blocher

WEBGL visualization of quantum gates operating on the Bloch Sphere.
JavaScript
2
star
27

airQplot

CO2 meter
C++
1
star
28

NBody

N-Body simulation, 2D.
C
1
star
29

osino

Open Simplex Noise for Enoki/CUDA
C
1
star
30

ZeroToSnake

Zero To Snake in 3600 seconds.
Python
1
star
31

twinprimetest

Test the twin primes like Thomas Nicely did, but on AVX.
C
1
star
32

vmtest

Demonstrate that virtual memory is cheap.
C
1
star
33

gbmtest

Test program to see which formats can be used by libgbm.
C
1
star