Skip to content

datho7561/image-quantizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

j'bang script to quantize an image to a colour palette

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published