Convert grayscale bitmap to texture.

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

Syntax

C#
public static float[,] FromBitmap(
	Bitmap image
)

Parameters

image
Type: System.Drawing..::.Bitmap
Image to convert to texture.

Return Value

Returns texture as 2D float array.

Exceptions

ExceptionCondition
AForge.Imaging..::.UnsupportedImageFormatExceptionOnly grayscale (8 bpp indexed images) are supported.

See Also