Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transparent background? #52

Open
Astrantia opened this issue Nov 3, 2021 · 4 comments
Open

transparent background? #52

Astrantia opened this issue Nov 3, 2021 · 4 comments

Comments

@Astrantia
Copy link

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?

@hackerb9
Copy link
Owner

hackerb9 commented Nov 3, 2021

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?

@Astrantia
Copy link
Author

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?

@hackerb9
Copy link
Owner

hackerb9 commented Nov 3, 2021

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!

@steven-omaha
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants