A utility for quantizing an image using the Gervautz-Purgathofer octree method:
- Wicked Code -- MSJ, August 1996
 - Wicked Code, MSJ October 1997
 - Color Quantization using Octrees | Dr Dobb's
 - Optimizing Color Quantization for ASP.NET Images
 
- 
Install CMake 3.1.0 or later
 - 
Install Boost
 - 
Install OpenImageIO 1.6 or later
 - 
Clone a copy of the repository:
git clone https://github.com/SimonBoorer/Quantize.git - 
Build with CMake:
cd Quantize mkdir build cd build cmake .. make 
Usage: Quantize [options] input-file output-file
Allowed options:
  -h [ --help ]                   produce help message
  -m [ --max-colours ] arg (=255) maximum number of colours in the palette
  -b [ --colour-bits ] arg (=8)   number of significant bits in each 8-bit 
                                  colour compartment