Tell me someone has turned this into a library we can use
ASCII characters are not pixels: a deep dive into ASCII rendering
11–20 of 158 posts
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#12Tell me someone has turned this into a library we can use
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#13How do you arrive at that? It's presented like it's a natural conclusion, but if I was trying to adjust contrast... I don't see the connection.
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#14Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#15It's important to note that the approach described focuses on giving fast results, not the best results. Simply trying every character and considering their entire bitmap, and keeping the character that reduces the distance to the target gives better results, at the cost of more CPU. This is a well known problem because early computers with monitors used to only be able to display characters. At some point we were ab…
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#16Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#17Earlier quoted context omitted.
In practice isn’t a large HashMap best for lookup, based on compile-time or static constants describing the character-space?
In the appendix, he talks about reducing the lookup space by quantising the sampled points to just 8 possible values. That allowed him to make a look up table about 2MB in size which were apparently incredibly fast.
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#18It reminds me of how chafa uses an 8x8 bitmap for each glyph: https://github.com/hpjansson/chafa/blob/master/chafa/interna...
There's a lot of nitty gritty concerns I haven't dug into: how to make it fast, how to handle colorspaces, or like the author mentions, how to exaggerate contrast for certain scenes. But I think 99% of the time, it will be hard to beat chafa. Such a good library.
EDIT - a gallery of (Unicode-heavy) examples, in case you haven't seen chafa yet: https://hpjansson.org/chafa/gallery/
Re: ASCII characters are not pixels: a deep dive into ASCII rendering
#19More seriously, using colors (not trivial probably, as it adds another dimension), and some select Unicode characters, this could produce really fancy renderings in consoles!