makew0rld / didder

An extensive, fast, and accurate command-line image dithering tool.
GNU General Public License v3.0
366 stars 10 forks source link

Auto-pick colours from image for use in the palette #2

Open Shrinks99 opened 3 years ago

Shrinks99 commented 3 years ago

Would be cool to auto-choose x number of colours from the input image using colour quantization as defined by a single integer set as the --palette value. For example --palette 5 would choose the 5 best colours from the source image and dither accordingly.

Additionally, don't limit users to a minimum of 2 values! By allowing people to select a single average colour the application now has a bonus feature of spitting out average coloured images. It's not a bug, it's a feature!

makew0rld commented 3 years ago

Other ways of doing this:

--palette mmcq --palette num 4
--palette mmcq:5

These methods allow the color quantization algorithm to be chosen, in case more are added in the future.

https://github.com/joshdk/quantize can be used for this.