LEADTOOLS (Leadtools assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
FromDibArray Method
See Also 
Leadtools Namespace > RasterImage Class : FromDibArray Method



hdib
Handle to the Windows DIB.
offset
Byte offset into hdib where the data starts.
hdib
Handle to the Windows DIB.
offset
Byte offset into hdib where the data starts.
Creates a new image from the specified Windows device independent bitmap (DIB) stored in a managed array.

Syntax

Visual Basic (Declaration) 
Public Shared Function FromDibArray( _
   ByVal hdib() As Byte, _
   ByVal offset As Integer _
) As RasterImage
Visual Basic (Usage)Copy Code
Dim hdib() As Byte
Dim offset As Integer
Dim value As RasterImage
 
value = RasterImage.FromDibArray(hdib, offset)
C# 
public static RasterImage FromDibArray( 
   byte[] hdib,
   int offset
)
C++/CLI 
public:
static RasterImage^ FromDibArray( 
   array<byte>^ hdib,
   int offset
) 

Parameters

hdib
Handle to the Windows DIB.
offset
Byte offset into hdib where the data starts.

Return Value

The newly created RasterImage object.

Example

For an example, refer to Leadtools.RasterImage.ToDibArray

Remarks

When this method is completed, there are two copies of the image in memory: the original DIB and the RasterImage it creates. Freeing one will not affect the other.

This method supports the standard DIB formats (BI_RGB and BI_BITFIELDS) as well as some FOURCC (Four Character Code) formats that some capture cards output.

These are the FOURCC that LEADTOOLS supports at the moment:

YVU9 (YUV9), I420 (YUV12), YUV2 , YV12 , IF09 , IYUV , UYVY , cyuv, YUY2, YVYU, Y41P, Y211, Y41T, Y42T.

This method does not support signed images.

For more information on DDBs and DIBs, refer to Using DIBs, DDBs, and the Clipboard.

Requirements

Target Platforms: Silverlight, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only), Windows Phone 7

See Also