Initializes a new instance of the UnmanagedImage class.

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

Syntax

C#
public UnmanagedImage(
	IntPtr imageData,
	int width,
	int height,
	int stride,
	PixelFormat pixelFormat
)

Parameters

imageData
Type: System..::.IntPtr
Pointer to image data in unmanaged memory.
width
Type: System..::.Int32
Image width in pixels.
height
Type: System..::.Int32
Image height in pixels.
stride
Type: System..::.Int32
Image stride (line size in bytes).
pixelFormat
Type: System.Drawing.Imaging..::.PixelFormat
Image pixel format.

Remarks

Note:Using this constructor, make sure all specified image attributes are correct and correspond to unmanaged memory buffer. If some attributes are specified incorrectly, this may lead to exceptions working with the unmanaged memory.

See Also