Open LevitatingBusinessMan opened 4 years ago
Nice. I haven't seen that particular method before. Browsh does use the UTF8 half black trick, so we do get 2 colours per TTY cell, I'd be interested to see the difference between this approach and imgcat's approach
Even greater quality can be achieved with an implementation that uses the full set of UTF8 block chars, as seen in https://github.com/daleroberts/tv/.
Additionally, Unicode 13 added a whole suite of legacy pseudographics characters in March 2020 that could be incredibly useful for this application (https://www.unicode.org/charts/PDF/U1FB00.pdf), but unfortunately the new characters aren't widely supported yet. I am eagerly awaiting the day they're widely adopted, characters U+1FB3C through U+1FB9F are particularly promising.
For now, in my opinion, the best implementation with UTF8 characters is going to look something like Dale Robert's tv (linked at the top).
Of course, you could use sixels to increase the resolution 9 to 1 over the current half block implementation, but they're less widely supported and use an indexed color scheme, so it's probably not worth the tradeoff. Perhaps an option to toggle sixel graphics is worth looking into in the future, however?
Cool, I didn't know that about the new chars in Unicode 13!
I don't want to support sixel. I want to remain true to Browsh's ability to render everything in pure text. Ultimately I want to develop a client in the browser, so you don't even need a terminal to benefit from Browsh.
I saw this issue: https://github.com/trashhalo/imgcat/issues/3
And I wasn't sure if browsh utilized this trick yet.