ColorRes example for Visual Basic
This example checks to see if the bitmap is 8 bits per pixel and converts it if it is not.
Dim RasterProc As New LEADRasterProcess
If LEADRasterView1.Raster.BitmapBits <> 8 Then
MousePointer = 11 ' hourglass
RasterProc.ColorRes LEADRasterView1.Raster, 8, CRP_OPTIMIZEDPALETTE, CRD_FLOYDSTEINDITHERING, 0
LEADRasterView1.ForceRepaint
MousePointer = 0 ' default
End If