Click or drag to resize
Accord.NET (logo)

UnmanagedImage Constructor (IntPtr, Int32, Int32, Int32, PixelFormat)

Initializes a new instance of the UnmanagedImage class.

Namespace:  Accord.Imaging
Assembly:  Accord.Imaging (in Accord.Imaging.dll) Version: 3.7.0
Syntax
public UnmanagedImage(
	IntPtr imageData,
	int width,
	int height,
	int stride,
	PixelFormat pixelFormat
)
Request Example View Source

Parameters

imageData
Type: SystemIntPtr
Pointer to image data in unmanaged memory.
width
Type: SystemInt32
Image width in pixels.
height
Type: SystemInt32
Image height in pixels.
stride
Type: SystemInt32
Image stride (line size in bytes).
pixelFormat
Type: System.Drawing.ImagingPixelFormat
Image pixel format.
Remarks

Note 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