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

How to avoid extra band with Sixels #222

Open
AmaruCoder opened this issue Oct 14, 2024 · 9 comments
Open

How to avoid extra band with Sixels #222

AmaruCoder opened this issue Oct 14, 2024 · 9 comments
Labels
bug Not working as advertised

Comments

@AmaruCoder
Copy link

Using the option -s, I keep getting a band at one edge of the image. Is this a feature of using Sixels or is it there an option I am missing? See the examples below:

See the green band at the bottom (using -s 50x20):

example1

See the white band on the right (using -s 50x19):

example2
@hpjansson
Copy link
Owner

What does chafa --version say? We've had a bit of back and forth on sixel transparency, since different terminals handle this differently. I think we finally got it right in version 1.14.3.

@AmaruCoder
Copy link
Author

It says:

Chafa version 1.14.4

Loaders:  GIF JPEG PNG QOI SVG TIFF WebP XWD
Features: mmx sse4.1 popcnt avx2
Applying: mmx sse4.1 popcnt avx2

Copyright (C) 2018-2023 Hans Petter Jansson et al.
Incl. libnsgif copyright (C) 2004 Richard Wilson, copyright (C) 2008 Sean Fox
Incl. LodePNG copyright (C) 2005-2018 Lode Vandevenne
Incl. QOI decoder copyright (C) 2021 Dominic Szablewski

This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

@hpjansson
Copy link
Owner

Looks like a persistent bug, then. Have you tried -t .01 as a workaround?

@hpjansson
Copy link
Owner

Also, which terminal are you on?

@AmaruCoder
Copy link
Author

Thank you. I tried -t .01 but got the same band. I am using iTerm2 Build 3.5.5.

@hpjansson
Copy link
Owner

Thanks. I think this is likely specific to iTerm2 output.

@hpjansson hpjansson added the bug Not working as advertised label Oct 18, 2024
@AmaruCoder
Copy link
Author

Thank you. My workaround for now is to set the background to black in iTerm2, and use -t 1.0 in Chafa.

@hpjansson
Copy link
Owner

hpjansson commented Oct 20, 2024

Ok. This works fine on the terminals I have access to on Linux/Windows, and unfortunately I don't have Mac hardware to test with, but I'll look into getting it installed in a VM. I have a few other things to attend to first, though.

In the meantime I have two questions for you:

  • Do transparent sixels from other programs display fine? E.g. lsix, convert with an image with an alpha channel.
  • Does your test case display correctly in other terminals you have access to, if any? E.g. Wezterm.

@AmaruCoder
Copy link
Author

Thank you for the followup. I don't h ave lsix or convert installed, but I have tested it in Wezterm and it works well. In fact Chafa doesn't need sixel in Weztermn.

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

No branches or pull requests

2 participants