dankamongmen / panelreels

high-level objects built atop ncurses
https://nick-black.com/dankwiki/index.php/Outcurses
Apache License 2.0
8 stars 1 forks source link

Image support #18

Closed dankamongmen closed 4 years ago

dankamongmen commented 4 years ago

We ought be able to do decent image support via Unicode blocks and mapping the color palette to match the image. http://nullwise.com/image_in_terminal.html

To do this really well, I think we'd want to leave most of the image processing in the hands of a library that knows how to do it well, and then blit the result to the screen. So your target would be 256-indexed colorspace (GIMP can generate optimum palettes for sure), scaled to the terminal character resolution (taking into account unicode blocks and aspect ratio of characters).

dankamongmen commented 4 years ago

the rust program viu appears to generate much higher quality than imgpreview.

dankamongmen commented 4 years ago

that looks pretty nice!

2019-11-10-125723_3840x2134_scrot

dankamongmen commented 4 years ago

mpv -vo tct is quite comparable to viu. both are superior to imgpreview.

dankamongmen commented 4 years ago

We're never going to reach this quality level without directcolor, which (see #56) is unlikely to work with ncurses. The best we can do is quantize down to 256 colors.

dankamongmen commented 4 years ago

fuck it, this will be an notcurses thing