Environment python 2.7.10 Install dependency pip install PIL pip install numpy Run python median-cut.py # Create 4 new images called quantized-image1.jpg to quantized-image4.jpg Result Origin Quantized Image 1 bit 2 bit 4 bit 8 bit