|
UnmanagedImageFromByteArray Method
|
Create unmanaged image from the specified byte array.
Namespace:
Accord.Imaging
Assembly:
Accord.Imaging (in Accord.Imaging.dll) Version: 3.8.0
Syntax public static UnmanagedImage FromByteArray(
byte[] bytes,
int width,
int height,
PixelFormat pixelFormat
)
Public Shared Function FromByteArray (
bytes As Byte(),
width As Integer,
height As Integer,
pixelFormat As PixelFormat
) As UnmanagedImage
Request Example
View SourceParameters
- bytes
- Type: SystemByte
Source byte array containing the image's pixels. - width
- Type: SystemInt32
The width of the image. - height
- Type: SystemInt32
The height of the image. - pixelFormat
- Type: System.Drawing.ImagingPixelFormat
The PixelFormat of the pixels.
Return Value
Type:
UnmanagedImageReturns new unmanaged image, which is a copy of source managed image.
Exceptions Remarks The method creates an exact copy of specified managed image, but allocated
in unmanaged memory.
See Also