Click or drag to resize
Accord.NET (logo)

ToolsToBitmap Method (Int16)

Converts an image given as a matrix of pixel values into a Bitmap. For more options, please use the MatrixToImage class.

Namespace:  Accord.Imaging
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
Syntax
public static Bitmap ToBitmap(
	this short[,] pixels
)
Request Example View Source

Parameters

pixels
Type: SystemInt16
A matrix containing the grayscale pixel values as bytes.

Return Value

Type: Bitmap
A Bitmap of the same width and height as the pixel matrix containing the given pixel values.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also