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(
	BitmapData imageData
)

Parameters

imageData
Type: System.Drawing.Imaging..::.BitmapData
Image data 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