7 ms·
Drawille: Pixel graphics in terminal with Unicode braille characters
- bwasti 9y agohttps://news.ycombinator.com/item?id=15549366 https://news.ycombinator.com/item?id=15549366
- fenwick67 9y agoOn a similar note, I wrote a library for drawing (24-bit) color raster graphics in the terminal if anyone's interested: https://github.com/fenwick67/term-px https://github.com/fenwick67/term-px Demo / image utility here: https://fenwick.pizza/term-px/ https://fenwick.pizza/term-px/
- gciruelos 9y agoi wrote something very similar, but in c++ https://github.com/gciruelos/seurat https://github.com/gciruelos/seurat
- msla 9y agoI can't wait until people rediscover Sixels and get actual graphics in the terminal in a network-transparent fashion. Modern terminal emulators support it, it just isn't widely known.
- new299 9y agoReally, is Sixels support that common now? Do you have a supported Linux terminal that you recommend for it?
- msla 9y agoxterm supports Sixels, and I'd be surprised if it were the only one. And this library enables things like video and X11 using Sixel, plus it has a list of terminals which support Sixels in the README: https://github.com/saitoha/libsixel https://github.com/saitoha/libsixel
- notheguyouthink 9y agoWow, sixels looks amazing. I'm honestly shocked
- mmatants 9y agoThis is a really neat looking project (and the GH readme references the original HN discussion). For folks who are generally into TTY UIs and dashboards, I also want to point out the Blessed terminal rendering lib and its ecosystem (which even includes a React bridge!): - https://github.com/chjj/blessed - https://github.com/yaronn/blessed-contrib - https://github.com/Yomguithereal/react-blessed (edited for syntax and also to clarify I am not affiliated with the above, just a fan)
- devereaux 9y agoAwesome! I wonder if unicode characters could be used on top of libcaca for an even more accurate rendering.
- XaspR8d 9y agoI've dreamed about doing an automated "ASCII"-art converter that utilizes all of Unicode. You could accomplish some pretty crazy line art if you put your mind to it, but the analysis would be super challenging. Also you'd either need a monospace Unicode font (which I don't imagine has anywhere near 100% glyph support) or incorporate spacing and kerning rules...
- devereaux 9y agoI would think about feeding rendered unicode characters to train a visual algorithm about which character may match, then "on the go" do a bitmap comparison to select the best one for the given case. The first part could be something like shapecatcher.com where you select the top N plausible candidates, then on the final part you select the best one for the case at hand. (well at least that's how I would try to implement that first) Anyway yes, it would be great!!
- to3m 9y agoI think the block characters are easier to read, but with a 4x4 grid the resolution is lower: https://en.wikipedia.org/wiki/Block_Elements https://en.wikipedia.org/wiki/Block_Elements The resulting pixel resolution is a bit screwy, especially if you use a tall, thin font like the one I tend to. Too many pixels horizontally, too few vertically. The upper block/lower block characters might be better in terms of aspect ratio, but then the overall resolution is made even worse... The 2x3 Braille grid makes a lot more sense.
- helb 9y agoThere are also 'sixels' (essentially 6x1), but terminal support is… not great. https://en.wikipedia.org/wiki/Sixel https://en.wikipedia.org/wiki/Sixel Some cool images: https://github.com/saitoha/libsixel https://github.com/saitoha/libsixel & https://github.com/saitoha/PySixel https://github.com/saitoha/PySixel
- nothrabannosir 9y agoThis is fantastic!! This should be supported in every terminal. What a dream.
- chmod775 9y agoDid anyone even stop to appreciate the irony of using a thing created for blind people to make something that will only ever be useful to people with sight, if at all?
- Sir_Cmpwn 9y agoWhy couldn't the blind appreciate this software?
- yebyen 9y agoAssuming this is a serious question, I think you will know the answer if you look at how any braille display works. They basically "display" one line of text in braille at a time. So unless you can appreciate your pixel graphics one printed line at a time, it's unlikely that any blind person will be able to get any benefit from this application.
- Sir_Cmpwn 9y agoExisting one-line braille displays don't understand braille unicode anyway. What's to stop a blind person from making a braille display with a greater display area?
- yebyen 9y agoI'm not the one who downvoted, and I don't know how many blind people make their own braille displays. It seems unlikely to me. (Not impossible. Another quick search reveals that multi-line braille exist, so it has been done.) TBH I just did a quick search for braille displays to validate my assumption, and when the first few results came up looking roughly like the one-line display that I expected, I wrote this comment. I'm not an expert in this kind of thing though.
- callahad 9y agoMy understanding is that braille displays are quite mechanically complex, as each cell needs to be able to individually raise and lower six pips. An 80-character, single-line terminal display would require 480 tiny actuators.
- NelsonMinar 9y agoI guess Tektronix graphics isn't supported by anything anymore? http://physics.oregonstate.edu/~landaur/nacphy/coping-with-unix/node140.html http://physics.oregonstate.edu/~landaur/nacphy/coping-with-u...
- cbm-vic-20 9y agoWhat is old is new again. Good ol' xterm has had Tektronix emulation for around 30 years.
- makecheck 9y agoMacTerm implements TEK 4014 and 4105 graphics (MacTerm is my project). Support for TEK graphics does seem rare though; aside from "xterm" and "gnuplot", I can’t think of anything else that uses those commands. Drawille works in MacTerm too; I ran some of the example programs just now. Neat, especially the rotating cube. :)
- flotillo 9y agoQuite reminiscent of the Teletext 'alpha mosaic' characters, which were 2x3 block graphics characters. It could be used to make pages like e.g. https://al.robotfuzz.com/~al/teletext/c4/1995-08-26-0046.0/496.html https://al.robotfuzz.com/~al/teletext/c4/1995-08-26-0046.0/4...
- ocrimgproc 9y agoAny program that can output this?
- flotillo 9y agoAny BBC Micro emulator would do the trick.
- grondilu 9y agoThe rotating cube is especially cute. I challenge anyone to now write a clone on the classic game Elite with this.
- j_s 9y agoThat AGPL though!
- j_s 9y agoMy previous attempt at a pithy complaint pointing out the license of this project was flagged, so I will attempt to provide a bit more value: This is a great idea and would be nice even just as an art project but unfortunately I can't do much personally useful with it. The choice is 100% up to the author and I respect how they avoid losing control of their IP. It is interesting to see the uptake and I wonder how many project using this tool are in violation of the license. https://www.gnu.org/licenses/why-not-lgpl.html https://www.gnu.org/licenses/why-not-lgpl.html