hpjansson / chafa

📺🗿 Terminal graphics for the 21st century.
https://hpjansson.org/chafa/
GNU Lesser General Public License v3.0
2.97k stars 64 forks source link

How to avoid extra band with Sixels #222

Open AmaruCoder opened 1 month ago

AmaruCoder commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

hpjansson commented 1 month ago

Also, which terminal are you on?

AmaruCoder commented 1 month ago

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

hpjansson commented 1 month ago

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

AmaruCoder commented 1 month ago

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

hpjansson commented 1 month ago

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:

AmaruCoder commented 3 weeks ago

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.