gizak / termui

Golang terminal dashboard
MIT License
13.11k stars 786 forks source link

display image support #174

Closed leslie-wang closed 5 years ago

leslie-wang commented 6 years ago

Thanks for the great project! Can it display image?

diamondburned commented 5 years ago

This could be possible with sixel. I'm not sure how to disable character escaping though, it's wiping out \033s...

cjbassi commented 5 years ago

Image support was just added to the master branch in the form of the image widget. It currently has 3 modes: regular, monochrome, and inverted monochrome. Check out the example image widget in the _examples folder. You can pass it an image URL and it'll display it in the terminal or it'll display a default image.

Currently, it renders images by converting them to various characters and adding color to them, but I would like to try and get sixel to work. I'm going to close issue, but I opened #213 to keep track of adding sixel support.