Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.3.5
FromDib Method
See Also 
Leadtools Namespace > RasterImage Class : FromDib Method




hdib
Handle to the Windows DIB.
Creates a new image from the specified Windows device independent bitmap (DIB).

Syntax

Visual Basic (Declaration) 
Public Shared Function FromDib( _
   ByVal hdib As IntPtr _
) As RasterImage
Visual Basic (Usage)Copy Code
Dim hdib As IntPtr
Dim value As RasterImage
 
value = RasterImage.FromDib(hdib)
C# 
public static RasterImage FromDib( 
   IntPtr hdib
)
Managed Extensions for C++ 
public: static RasterImage* FromDib( 
   IntPtr hdib
) 
C++/CLI 
public:
static RasterImage^ FromDib( 
   IntPtr hdib
) 

Parameters

hdib
Handle to the Windows DIB.

Return Value

The newly created RasterImage object.

Example

For an example, refer to ToDib

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: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also