j'bang script to quantize an image to a colour palette.
Heavily inspired by ImageGoNord.
By default it applies a (linear) pre blur to the image to reduce noise, then quantizes each pixel to one of the colours in the Monokai colour scheme.
Requires j'bang to run
jbang ImageQuantizer.java input-image.png output-image.pngTo use a different scheme, make a list of java.awt.Color,
and pass it to ImageQuantize.quantizeImage instead of MONOKAI in the main method.
Run make in the root to replicate this demo
| Input | Output |
|---|---|
![]() |
![]() |
Photo by Sean Foley on Unsplash
- The image is always output in
.pngformat, no matter what extension you specify the output image to have.

