LEADTOOLS GDI/GDI+ (Leadtools.Drawing assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
ToHBitmap(RasterImage) Method
See Also 



image
The source image
image
The source image
Creates a Windows Device Dependent Bitmap (DDB) from a Leadtools.RasterImage.

Syntax

Visual Basic (Declaration) 
Overloads Public Shared Function ToHBitmap( _
   ByVal image As RasterImage _
) As IntPtr
Visual Basic (Usage)Copy Code
Dim image As RasterImage
Dim value As IntPtr
 
value = RasterImageConverter.ToHBitmap(image)
C# 
public static IntPtr ToHBitmap( 
   RasterImage image
)
C++/CLI 
public:
static IntPtr ToHBitmap( 
   RasterImage^ image
) 

Parameters

image
The source image

Return Value

A handle to the Windows DDB this method creates.

Example

Remarks

Converts a Leadtools.RasterImage object into a Windows device dependent bitmap (DDB). When this method is completed, there are two copies of the image in memory: the DDB and the original Leadtools.RasterImage. Freeing one will not affect the other.

NOTE: This method returns the data in an unmanaged handle. The caller is responsible for freeing the DDB's handle when it is no longer needed using the the DeleteObject Windows API, otherwise, your application will leak resources.

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

For more information refer to RasterImage and GDI/GDI+.

Requirements

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

See Also