Set pallete of the 8 bpp indexed image to grayscale.
Namespace:
AForge.ImagingAssembly: AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)
Syntax
| C# |
|---|
public static void SetGrayscalePalette( Bitmap image ) |
Parameters
- image
- Type: System.Drawing..::.Bitmap
Image to initialize.
Remarks
The method initializes palette of
Format8bppIndexed
image with 256 gradients of gray color.
Exceptions
| Exception | Condition |
|---|---|
| AForge.Imaging..::.UnsupportedImageFormatException | Provided image is not 8 bpp indexed image. |