atanunq / viu

Terminal image viewer with native support for iTerm and Kitty
MIT License
2.58k stars 58 forks source link

Allow displaying transparent pictures actually transparent #10

Closed L3viathan closed 5 years ago

L3viathan commented 5 years ago

Currently, when viewing a picture with transparency, such as a PNG with transparent parts, those parts are rendered with the familiar "transparency grid" of light and dark gray.

It would be nice to instead (maybe with a switch) render them "actually transparent" (not setting a background color for that character), such that I see the background color of my terminal, whatever that might be.

You currently seem to use just a single character for everything, U+2584. With this implemented, you'd have to instead use spaces (for characters where both "subpixels" are transparent), and U+2580 (UPPER HALF BLOCK) for those where the upper part should have a color, and the lower half should be transparent.

atanunq commented 5 years ago

I like the idea! I will definitely come back to this issue when I have the time. Thank you!