Create and initialize new 8 bpp grayscale image.

Namespace:  AForge.Imaging
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public static Bitmap CreateGrayscaleImage(
	int width,
	int height
)

Parameters

width
Type: System..::.Int32
Image width.
height
Type: System..::.Int32
Image height.

Return Value

Returns the created grayscale image.

Remarks

The method creates new 8 bpp grayscale image and initializes its palette. Grayscale image is represented as Format8bppIndexed image with palette initialized to 256 gradients of gray color.

See Also