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

Dithering support #11

Open
forthrin opened this issue Aug 30, 2019 · 5 comments
Open

Dithering support #11

forthrin opened this issue Aug 30, 2019 · 5 comments

Comments

@forthrin
Copy link

Could you add support for dithering?

(To avoid flat, unsightly areas that appear in some images after colour reduction.)

Since you're using ImageMagick this should be simple.

PS! Thanks for a nice and simple utility.

@tzvetkoff
Copy link
Owner

tzvetkoff commented Sep 11, 2019

Sure thing, it's relatively easy to implement.
Do you have a particular image that we can use for a test, or should I try finding one of my own?

P.S. Sorry for the late response - I didn't have much time to look at anything these days. :-(

@forthrin
Copy link
Author

Should be easy to see this for most images when using the -p option.

@tzvetkoff
Copy link
Owner

Does pipe work for you?
I see there are quite many dithering options so I guess it's a bit impractical to implement all of them.

convert -dither FloydSteinberg christmas-pig.png png:- | ./src/im2a -p -

@forthrin
Copy link
Author

No, because if you scale an already-dithered image (to terminal width), it becomes an ugly mess.

Also, dithering must be done in conjunction with the colour reduction (down to the ANSI palette).

Just pick a single dithering method. I think "pattern" is the best one for pixel graphics like this.

@forthrin
Copy link
Author

When will you have a test version of this ready?

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