Available in the LEADTOOLS Imaging toolkit.
HistogramTableSize example for Visual Basic
If LEAD1.BitmapBits = 64 Or LEAD1.BitmapBits = 48 Then LEAD1.HistogramTableSize = 65536 Else LEAD1.HistogramTableSize = 256 End If