6 ms·
I wish you could display images in the command line. it would have so many cool applications
by make3 8y ago
I wish you could display images in the command line. it would have so many cool applications
- emredjan 8y agoYou can, with iTerm2: https://www.iterm2.com/documentation-images.html https://www.iterm2.com/documentation-images.html
- mcintyre1994 8y agoThis is cool! Not sure why it's not in the docs, but iTerm 2 > Install Shell Integration will do this for you, if you let it install the Utilities too.
- anonyte 8y agoThere are some terminals and/or protocols that support this: * https://en.m.wikipedia.org/wiki/ReGIS https://en.m.wikipedia.org/wiki/ReGIS * https://en.m.wikipedia.org/wiki/Sixel https://en.m.wikipedia.org/wiki/Sixel * https://en.m.wikipedia.org/wiki/Tektronix_4010 https://en.m.wikipedia.org/wiki/Tektronix_4010 Some code: * https://github.com/saitoha/PySixel/ https://github.com/saitoha/PySixel/ * https://github.com/eliukblau/pixterm https://github.com/eliukblau/pixterm
- afranchuk 8y agoKitty terminal can too, and has designed a protocol for it: https://github.com/kovidgoyal/kitty/blob/master/docs/graphics-protocol.rst https://github.com/kovidgoyal/kitty/blob/master/docs/graphic...
- laumars 8y agoThere are so many unofficial escape sequences for rendering images in modern terminal emulators. Kitty has one, as does Terminology and iTerm (both different from each other). Then there is stuff like Sixel (supported by xterm), ReGIS (also supported by xterm but it's horrible to use) and other methods from VTs of old. I really wish there was just one standard way to render images on the terminal (like there is one standard for rendering hyperlinks on the terminal), but there's an XKCD sketch somewhere about creating a standard to consolidate standards.
- vram11 8y agoThis one: https://imgs.xkcd.com/comics/standards.png https://imgs.xkcd.com/comics/standards.png
- makecheck 8y agoMacTerm implements Sixels, some of the bitmap graphics sequences from iTerm2, and TEK vector graphics. Graphics are definitely not that widely supported though, making it hard for programs to reliably display images.
- pen2l 8y agoSome of these seem a little hacky. Jupyter has sort of a terminal mode... I really think we should start using something like Jupyter as our main terminal.
- whatl3y 8y agoAlthough the image would open separately from the terminal window, Termgraph is cool and I might extend RESTcharts (https://github.com/whatl3y/restcharts https://github.com/whatl3y/restcharts) to support a CLI mode that would generate an image of a chart based on an input file, then open the image after it's created on the file system.
- agumonkey 8y agooh you sure can, ever seen a1kon donut ? https://www.google.com/search?hl=en&q=a1kon%20donut.c https://www.google.com/search?hl=en&q=a1kon%20donut.c also libcaca ps: one day I'll make a terminal photoshop