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

Dither intensity does not work properly in version 1.14.3 #216

Closed
veltza opened this issue Sep 9, 2024 · 3 comments
Closed

Dither intensity does not work properly in version 1.14.3 #216

veltza opened this issue Sep 9, 2024 · 3 comments
Labels
bug Not working as advertised

Comments

@veltza
Copy link

veltza commented Sep 9, 2024

I prefer to use dithering with sixels because it prevents color banding. But I noticed that the new version 1.14.3 no longer accepts decimal numbers in the dither intensity.

> chafa -f sixels --dither ordered --dither-intensity 0.85 26039de5.jpg
chafa: Dither intensity must be a positive real number or fraction.
> 
> chafa --version                                                     
Chafa version 1.14.3

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.

I used the stand-alone executable here, but the same thing happened when I compiled it from the source.

@hpjansson
Copy link
Owner

Ah, looks like this is just scanf() being broken. I'll issue a fixed release asap. Out of curiosity, are you on Windows or Linux? Do you have a non-US locale set? If so, you may be able to work around it by using the decimal separator prescribed by your locale (e.g. in the Norwegian locale it's ,).

@veltza
Copy link
Author

veltza commented Sep 9, 2024

Your guess was right, my locale uses a comma as a decimal separator. It didn't occur to me to try it because it also worked with the dot before.

@hpjansson hpjansson added the bug Not working as advertised label Sep 9, 2024
@hpjansson
Copy link
Owner

The fix is in 1.14.4. Thanks for pointing out the problem!

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