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

Bad interaction with lolcat #108

Closed
eMPee584 opened this issue Sep 8, 2022 · 4 comments
Closed

Bad interaction with lolcat #108

eMPee584 opened this issue Sep 8, 2022 · 4 comments

Comments

@eMPee584
Copy link

eMPee584 commented Sep 8, 2022

chafa --colors 16 --size $(tput cols)x18 --color-space din99d --fill braille --work 3 -- /usr/local/share/icons/keine-panik.svg | lolcat with chafa 1.6.0-1:
Screenshot_20220828_044246

and with 1.12.1-1:
Screenshot_2022-08-28_04-45-56

now fixed it with chafa --colors 2 --size $(tput cols)x18 --color-space din99d -- /usr/local/share/icons/keine-panik.svg | lolcat to be like this:
image
which is not bad, but still, i liked the white lettering fill better 😄
Maybe you have an idea what changed about the conversion algorithm and whether there could be an option to get something similiar to the original effect.

This is the SVG used:
keine-panik

@hpjansson
Copy link
Owner

Interesting challenge :-)

There were several big changes between 1.6 and 1.12, so I'll have to fiddle with it a bit and look at the interactions with lolcat before I can give a good answer.

Thinking out loud -- you may be able to get part of the way there by specifying -O 0 to make lolcat happier and increasing the transparency threshold (e.g. -t .9) to get more fuzz on the edges. Maybe also increase work factor a little (-w 5 or higher). You may also be able to get rid of some of the horizontal dotted line segments by applying --symbols -border (note the minus sign).

@hpjansson
Copy link
Owner

Quick workaround: chafa --color-space din99d -c 16 -w 3 -t 1 --fill braille keine-panik.svg. The -t 1 does most of the work. I still need to figure out what exactly is confusing lolcat.

@eMPee584
Copy link
Author

ha super cool that brings more white back
i guess doing away with the grey is tricky 😅
but it's nice as it is thanks 😎
image

@hpjansson
Copy link
Owner

This was actually caused by lolcat not handling inverted colors properly. I committed a fix to minimize the runs of inverted colors when possible.

eMPee584 added a commit to fsfw-dresden/usb-live-linux that referenced this issue Oct 11, 2022
@hpjansson hpjansson changed the title Progress b0rked our terminal welcome screen 😄 Bad interaction with lolcat Nov 13, 2022
hpjansson added a commit that referenced this issue May 21, 2023
Downstream tools don't always handle inverted colors correctly, and it
doesn't really cost us much to minimize the resulting artifacts.

Fixes #108 (GitHub).
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

2 participants