Available in the LEADTOOLS Imaging toolkit.
GrayscaleExt example for Visual Basic
LEAD1.GrayscaleExt 300, 590, 110