Available in the LEADTOOLS Imaging toolkit.
Posterize example for C++ 4.0 and later
This example applies a six-color poster effect and redisplays the image.
m_Lead1.Posterize(6); m_Lead1.ForceRepaint();