Coder Social home page Coder Social logo

imcat's Introduction

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

imcat's People

Contributors

samanthaclarke1 avatar stolk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.