imcat/README.md

71 lines
1.7 KiB
Markdown
Raw Normal View History

2018-04-18 20:14:25 +02:00
# imcat
2018-04-19 14:34:01 +02:00
Preview any size image in a terminal window.
2018-04-18 20:14:25 +02:00
2018-04-20 20:45:34 +02:00
![imcat tiger](images/imcat_tiger.png "imcat tiger")
2018-04-18 20:14:25 +02:00
2018-04-19 14:34:01 +02:00
# Platform
Supports Linux, MacOS and Microsoft Windows 10 terminals.
2018-04-18 20:14:25 +02:00
## 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.
2018-04-19 14:34:01 +02:00
imcat also works on the latest version of Windows 10.
2018-04-20 20:45:34 +02:00
## 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"
```
2018-04-19 20:31:38 +02:00
## Todo
2018-04-19 22:32:52 +02:00
* Handle alpha-transparency. Requires reading the terminal background colour, somehow. Tricky.
2018-04-19 20:31:38 +02:00
## Done
2018-04-19 14:34:01 +02:00
2018-04-18 20:14:25 +02:00
* Correct for aspect ratio of terminal font.
2018-04-19 14:34:01 +02:00
## Building
2018-04-19 07:39:23 +02:00
### Unix
On Linux, just use 'make' to build the imcat binary.
2018-04-19 14:34:01 +02:00
2018-04-19 07:39:23 +02:00
### 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 <A HREF="https://stolk.org/imcat/imcat.exe">imcat.exe</A> binary.
2018-04-19 14:34:01 +02:00
2018-04-18 20:14:25 +02:00
## License
2018-09-22 20:57:32 +02:00
* [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
2018-04-18 20:14:25 +02:00
## Authors
[Bram Stolk](http://stolk.org).
[stb_image.h](http://nothings.org/stb_image.h) is by Sean Barrett et al.
2018-04-20 20:45:34 +02:00
## Acknowledgements
2018-04-19 07:39:23 +02:00
A shout out to [Frogtoss](http://github.com/mlabbe) for the idea and help. Thanks!
2018-04-18 20:14:25 +02:00
2018-04-20 20:45:34 +02:00
## Gallery
![Sample use](images/sampledesktop.png "Sample use.")