Is it possible to view images in a terminal?

18

9

I have ssh access to my web server. I have some image files there and I would like to see a preview of. Is there a tool that will help me? Is there a curses-based viewer that will approximate the picture?

B. Marek

Posted 2012-01-15T23:38:00.970

Reputation: 299

Answers

30

Oh yes

enter image description here

If you prefer colour there's libcaca

RedGrittyBrick

Posted 2012-01-15T23:38:00.970

Reputation: 70 632

@RedGrittyBrick : Nice, but most screen can display colours today. (this include ssh and ncurses) – user2284570 – 2014-08-02T13:12:13.083

@user2284570: libcaca? (answer updated)

– RedGrittyBrick – 2014-08-02T20:51:16.477

3I'd +10 this if I could... LOL! Good answer! – skub – 2012-01-16T00:10:38.877

aview is awesome! Is there any particular difference between the formats .p[ngbp]m? – None – 2012-01-16T00:19:36.243

@hesse: about .p{ngbp}m and converting them to/from jpeg etc

– RedGrittyBrick – 2012-01-16T16:15:29.310

all I can say is YES. – Fox Wilson – 2013-08-18T03:40:11.650

8

The libcaca library comes with img2txt and cacaview tools for this. In color.

One can watch movies through it as well:

mplayer -really-quiet -vo caca ~/Movies/*

user1686

Posted 2012-01-15T23:38:00.970

Reputation: 283 655

-1

there's also fbi if you have frame buffer enabled. IDK if it would work over SSH, but I can view pictures from TTY without having X enabled with it.

Rob

Posted 2012-01-15T23:38:00.970

Reputation: 2 152

No, it wouldn't, because SSH does not have a framebuffer. – user1686 – 2013-08-18T12:37:16.383

1Yeah. I know a lot more about what's going with my stuff than I did over a year ago. – Rob – 2013-08-19T15:42:31.207