Available in the LEADTOOLS Imaging toolkit.
Grayscale example for Visual Basic
This example converts the bitmap to 12-bit grayscale.
Lead1.Grayscale 12 'Grayscale image to 12-bit