hpjansson / chafa

📺🗿 Terminal graphics for the 21st century.

Home Page:https://hpjansson.org/chafa/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to avoid extra band with Sixels

AmaruCoder opened this issue · comments

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

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.

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

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

Also, which terminal are you on?

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

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

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

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.

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.