Odd request, how to view images in Terminal (as ASCII, or etc.)?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Odd request, how to view images in Terminal (as ASCII, or etc.)?
This might seem like a fairly odd request so I'm not sure whether anybody knows the answer to it, but I had this little silly idea whether I could display rough images I have in a terminal or in the TTY[1-6] (I forgot what they're called, the big full-screen terminals that appear when you push <CTRL>+<ALT>+[1-6])?
I'm thinking about both being able to look at pictures in a web browser (the only one I know is w3m which I only figured out yesterday and the only thing I know how to do is w3m <url> so that is really basic), and being able to look at something like .jpg or .png images, in a kind of ASCII like manner. I mean the terminal can display colour (like when you use the top command and then push z) so is it really so crazy to be able to display some (albeit extremely raw) graphics?
Please respond, because this sounds like a wonderfully interesting feature (especially to show off to your friends)- if it exists
Displaying graphics on a pixel-oriented display is quite different from displaying text on a character-cell based display. The ability to display color is only a small part of what is required to render a bitmapped image.
There are the old-fashioned images generated by using character cells as pixels, where various characters having different 'densities' were used to create images in a monochrome. These were generally rendered on dot-matrix or dasiy wheel printers, in order to get enough character cells to produce an image. This could be done without too much difficulty now, simply by using a lookup table to translate pixel colors into characters, as the rendering part of a bitmap display algorithm.
Also done with character cell text is the so-called ASCII-art. This technique exploits the shape of certain characters, and the way certain characters are able to 'join' other characters to produce shapes. The name ASCII-'art' is appropriate for this, as it would be very difficult (and by 'very', I mean near impossible) to algorithmically translate bitmapped images to this form of display.
Also done with character cell text is the so-called ASCII-art. This technique exploits the shape of certain characters, and the way certain characters are able to 'join' other characters to produce shapes. The name ASCII-'art' is appropriate for this, as it would be very difficult (and by 'very', I mean near impossible) to algorithmically translate bitmapped images to this form of display.
Your cited URL isn't what most would call ACII-art, but does exemplify what I also described in my post. The character cells are like pixels, and the color depth of the pixel is given by the relative density of the character placed in the cell. It may be worth noting that this requires the use of pixed-pitch fonts.
--- rod.
Your cited URL isn't what most would call ACII-art, but does exemplify what I also described in my post.
Well I wasn't really expecting any 'artistic' value of of my terminal I think I found jp2a by simply using apropos ascii and browsing through the output. And even though the fbi program that doc.nice recommended is far better in terms of quality, I kind of like jp2a better It's much cooler to open pictures using ASCII-"art" than just regularly
That only problem is, that I can't seem to get the colours working in jp2a. Has anyone here used that program? Is it possible to:
Flip between images using the left and right arrow buttons? It seems like that isn't possible, but that would be so much easier not to have to input the filename every time.
Make the colours better? I only manage to get like 4 colours and it looks almost worse than it does in black and white
Make the characters smaller; that is to say to make the resolution better?
(also), what is the TTY1 through 6 called?
I want to find a sort of middle way between fbi and jp2a which has the charm and coolness of ASCII but some of the quality of a regular viewer. I might be asking for too much, but that would really make my day
This might seem like a fairly odd request so I'm not sure whether anybody knows the answer to it, but I had this little silly idea whether I could display rough images I have in a terminal or in the TTY[1-6] (I forgot what they're called, the big full-screen terminals that appear when you push <CTRL>+<ALT>+[1-6])?
to display color images without X use zgv. This won't display them as ascii-art.
To display colorful images as ascii-art use cacaview, but it supports limited only *.bmp.
to display movies as ascii art use aaxine, "mplayer -vo aa" or "mplayer -vo caca".
There was another program for displaying images as greyscale ascii art, but I forgot its' name. It was called aview or aaview.
Quote:
Originally Posted by baldurpet
I'm thinking about both being able to look at pictures in a web browser (the only one I know is w3m which I only figured out yesterday and the only thing I know how to do is w3m <url> so that is really basic), and being able to look at something like .jpg or .png images, in a kind of ASCII like manner. I mean the terminal can display colour (like when you use the top command and then push z) so is it really so crazy to be able to display some (albeit extremely raw) graphics?
"links" browser version 2 can display websites with images using svgalib or framebuffer, without X.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.