How can I display an image in the terminal?
Trying to answer the question in http://stackoverflow.com/questions/12233105/how-can-i-display-an-image-in-the-terminal/22537549?noredirect=1#comment41404352_22537549 :
Is there any sort of utility I can use to convert an image to ASCII and then print it in my terminal? I looked for one but couldn't seem to find any.
I thought that the Ipython notebook is pretty good at doing it. You have to prepend bash commands with a bang:
In [34]:
! wget "https://invibe.net/cgi-bin/index.cgi/Figures/Sanz12/FigureTrois?action=AttachFile&do=get&target=figure3.png"
In [35]:
!ls *.png
In [36]:
from IPython.display import display, Image
URL ='FigureTrois?action=AttachFile&do=get&target=figure3.png'
display(Image(URL))
Now we may use the rich display system from ipython (see http://nbviewer.ipython.org/github/ipython/ipython/blob/1.x/examples/notebooks/Part%205%20-%20Rich%20Display%20System.ipynb):
Works also with an url
In [33]:
from IPython.display import display, Image
URL ='https://invibe.net/cgi-bin/index.cgi/ImageGallery?action=AttachFile&do=get&target=raster_plot.png'
display(Image(URL))
May be a solution in many contexts (especially computing) - and be aware that [ipython] notebook are not restricted to python.