| Visual Basic (Declaration) | |
|---|---|
Public Sub StartDithering( _ ByVal palette() As RasterColor, _ ByVal colors As Integer _ )  | |
| Visual Basic (Usage) |  Copy Code | 
|---|---|
 | |
| C# | |
|---|---|
public void StartDithering( RasterColor[] palette, int colors )  | |
| C++/CLI | |
|---|---|
public: void StartDithering( array<RasterColor>^ palette, int colors )  | |
Parameters
- palette
 - The palette this uses for dithering. You can specify your own palette, or use a null reference (Nothing in Visual Basic) for LEAD's fixed palette.
 - colors
 - Number of colors used in the palette. If the palette contains more colors, only the first colors colors are used. Valid values are 2 to 256.
 
This example dithers each line in one image and writes it to another image.
| Visual Basic |  Copy Code | 
|---|---|
Public Sub StartDitheringExample() | |
| C# |  Copy Code | 
|---|---|
public void StartDitheringExample()  | |
The following flow chart shows how the methods relate to each other:

The following properties from the RasterImage are used to control the dithering operation:
Width Height BitsPerPixel Order - if BitsPerPixel is greater than 8 DitheringMethod - if BitsPerPixel is less than 16 
This method does not support signed images.
For more information, refer to Introduction to Image Processing With LEADTOOLS.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
Reference
RasterImage ClassRasterImage Members
Introduction to Image Processing With LEADTOOLS
Dithering Methods
Codecs.CodecsThumbnailOptions.DitheringMethod property
ImageProcessing.ColorResolutionCommand.DitheringMethod property
RasterDitheringMethod enumeration
RasterDefaults.DitheringMethod property
RasterImage.DitheringMethod property
RasterImage.DitherLine method
RasterImage.StopDithering method
RasterBufferConverter.Convert