ANN: ImageInTerminal.jl

Hello everyone!

Happy to announce a little utility package for working with images in a plain terminal.

Github: GitHub - JuliaImages/ImageInTerminal.jl: Julia package for displaying images in the terminal using ANSI colors and Unicode characters

From the readme:

ImageInTerminal.jl is a drop-in package that once imported changes a how a single Colorant and whole Colorant arrays (i.e. Images) are displayed in the interactive REPL. The displayed images will be downscaled to fit into the size of your active terminal session.

Example for Colorant Arrays:

Example for Colorants:

14 Likes

This is so sweet. What a fun package. Even people who don’t work with colors/images might like it:

5 Likes

Indeed. This is a great way to visualize sparsity structure in small matrices.

Note that @Evizero already had a great way of visualizing sparsity patterns: https://github.com/Evizero/UnicodePlots.jl#sparsity-pattern

2 Likes

Note it doesn’t strictly have to be small, although we’d want an optimized method for larger matrices:

That said, thanks Kristoffer for pointing to UnicodePlots; that is better, unless you actually want a “density” style plot.

Cool! Could this be added to UnicodePlots.jl as heatmap-plots?

UnicodePlots already have densityplot which are quite close to heatmaps. EDIT no of course it would be even cooler to use the color support from this package.

I don’t want to promise too much, since it usually takes me a while to get around to these little side projects. I have been planning to refactor UnicodePlots to make use of 256/24bit colors for a while now. Displaying Images was initially meant to be a part of it, but it made sense to make it into it’s own little thing. I did write the ImageInTerminal.jl internals in a way that will allow UnicodePlots to make use of the encoding functionality for heatmaps and such.

That said, I have many other Julia-related endeavours on my agenda as well, so I am afraid this will depend on me getting a random urge to implement it (which is basically what happened here)

4 Likes

We will trust in your random urge :slight_smile:

3 Likes

Obligatory Lego Batman quote: I only use black. And sometimes very dark grey.

1 Like