lsix icon indicating copy to clipboard operation
lsix copied to clipboard

transparent background?

Open Astrantia opened this issue 4 years ago • 4 comments

hello and thanks for the project.

is it possible to set the montaged gallery background to transparent color? I tried setting montage "${onerow[@]}" $imoptions -background none gif:- | convert - -background 'rgba(0,0,0,0)' sixel:- but it doesn't seem to work. Does sixel not support viewing transparent background or what could be wrong?

Astrantia avatar Nov 03 '21 05:11 Astrantia

The sixel format supports 1-bit transparency, but ImageMagick does not know how to do that yet. The best we can do until that bug is fixed is to detect the terminal's background color and use that. It's not a bad solution as it means we also get antialiased fonts and drop shadows. Does your terminal not report the correct background color? Or, are you using an image or transparent background in your terminal?

hackerb9 avatar Nov 03 '21 07:11 hackerb9

The sixel format supports 1-bit transparency, but ImageMagick does not know how to do that yet. The best we can do until that bug is fixed is to detect the terminal's background color and use that. It's not a bad solution as it means we also get antialiased fonts and drop shadows. Does your terminal not report the correct background color? Or, are you using an image or transparent background in your terminal?

lsix is correctly detecting my terminal's background color, but i've set my terminal itself to be 70% transparent, so the background color ends up being a solid color. from what i gather from your reply, it is impossible to get a no-color background currently with imagemagick?

Astrantia avatar Nov 03 '21 07:11 Astrantia

from what i gather from your reply, it is impossible to get a no-color background currently with imagemagick?

Correct. And I'm not even sure that it would look good if it did work. You would lose antialiasing, so it may look grotty.

lsix is correctly detecting my terminal's background color, but i've set my terminal itself to be 70% transparent, so the background color ends up being a solid color.

That makes sense. Can you please send a screenshot of the problem and let me know which terminal you're using? While there's no fix at the moment, I'd like to keep this bug open as a reminder that sixel transparency needs further work and to try some experiments to see if it is worth pursuing.

If you could also run lsix > opaque.six and attach that file to this bug, I'd appreciate it. I will see if I can make it transparent and how it looks when I do. Thanks!

hackerb9 avatar Nov 03 '21 07:11 hackerb9

I just ran into the same problem. Here is how it looks for me.

Screenshot: screen

sixel file: https://gist.githubusercontent.com/steven-omaha/0a5e2f8927be5866d8b666e7efffd661/raw/520a08bac24b57d59418d938c9050c042ee75213/opaque.six

steven-omaha avatar Feb 25 '22 11:02 steven-omaha