LEADTOOLS (Leadtools assembly)
LEAD Technologies, Inc

ToDib Method






Type of DIB to create.
Gets an unmanaged pointer containing a Windows device independent bitmap (DIB) version of this image. WinRT support
Syntax
public IBuffer ToDib( 
   RasterConvertToDibType type
)
'Declaration
 
Public Function ToDib( _
   ByVal type As RasterConvertToDibType _
) As IBuffer
'Usage
 
Dim instance As RasterImage
Dim type As RasterConvertToDibType
Dim value As IBuffer
 
value = instance.ToDib(type)
public IBuffer ToDib( 
   RasterConvertToDibType type
)
 function Leadtools.RasterImage.ToDib( 
   type 
)
public:
IBuffer^ ToDib( 
   RasterConvertToDibType type
) 

Parameters

type
Type of DIB to create.

Return Value

A handle to the Windows DIB.
Remarks

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

This methods allocates a DIB bitmap and copies the RasterImage to the DIB.

NOTE: This method returns the data in an unmanaged buffer. The caller is responsible for freeing the DIB's IntPtr when it is no longer needed. You can use Marshal.FreeHGlobal.

A DIB consists of one of the following:

followed by a color table and then the bitmap data. The resulting DIB type is determined by the value of the type parameter.

The orientation of the image and color order will depend on how the image was loaded into the RasterImage.

When you no longer need the DIB, you must free it.

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

This function does not support signed images.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RasterImage Class
RasterImage Members
FromDib(IntPtr) Method
FromDibArray Method
ToDibArray Method
RasterImageConverter.FromHBitmap
RasterImageConverter.ToHBitmap
ChangeFromDib Method
RasterImageConverter.ChangeFromHBitmap
ChangeToDib Method
RasterImageConverter.ChangeToHBitmap

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.