Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.04 KB

README.md

File metadata and controls

35 lines (21 loc) · 1.04 KB

Image Quantizer

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.

Running

Requires j'bang to run

jbang ImageQuantizer.java input-image.png output-image.png

Hacking

To use a different scheme, make a list of java.awt.Color, and pass it to ImageQuantize.quantizeImage instead of MONOKAI in the main method.

Demo

Run make in the root to replicate this demo

Input Output

Photo by Sean Foley on Unsplash

Limitations

  • The image is always output in .png format, no matter what extension you specify the output image to have.