Available in the LEADTOOLS Imaging toolkit.
Posterize example for Visual J++
This example applies a six-color poster effect and redisplays the image.
LEAD1.Posterize( (short) 6 ); LEAD1.ForceRepaint();