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

Add number of colors option for pngquant #144

Closed
nosideeffects opened this issue Mar 16, 2017 · 5 comments
Closed

Add number of colors option for pngquant #144

nosideeffects opened this issue Mar 16, 2017 · 5 comments

Comments

@nosideeffects
Copy link

pngquant allows you to pass in a number of colors to quantize images with a maximum allowed palette size.

@toy
Copy link
Owner

toy commented Mar 16, 2017

Do you mean the --posterize flag?

@nosideeffects
Copy link
Author

That is different than what I meant, but that would be useful, too.

The command is pngquant [options] [ncolors] -- pngfile. For instance, in my current workflow, I produce many small icons, so it is safe for me to limit the colors to 16. Without the option to specify the colors, I must use pngquant separately before using image_optim.

@toy
Copy link
Owner

toy commented Mar 16, 2017

Ah, you are right! I thought that I remembered an option for number of colours, but did not find it in the list of pngquant flags.
Should be easily doable then.

@toy
Copy link
Owner

toy commented May 6, 2017

@nosideeffects Please have a look at pngquant-max-colors branch

@nosideeffects
Copy link
Author

Looks good to me!

@toy toy closed this as completed in 743f77d Jun 8, 2017
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