Click or drag to resize
Accord.NET (logo)

TextureToolsFromBitmap Method (BitmapData)

Convert grayscale bitmap to texture

Namespace:  Accord.Imaging.Textures
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.6.0
Syntax
public static float[,] FromBitmap(
	BitmapData imageData
)
Request Example View Source

Parameters

imageData
Type: System.Drawing.ImagingBitmapData
Image data to convert to texture

Return Value

Type: Single
Returns texture as 2D float array.
Exceptions
ExceptionCondition
UnsupportedImageFormatExceptionOnly grayscale (8 bpp indexed images) are supported.
See Also