This method converts a Device Dependent Bitmap to a Device Independent Bitmap
[Visual Basic]   [Boolean = ]imagekitcontrolname.DibFromBitmap(hBm As Long, hPal As Long)
[Visual C++]     [BOOL = ]imagekitcontrolname.DibFromBitmap(long hBm, long hPal)

Parameters

Name Explanation
hBm The bitmap handle
hPal The bitmap palette (0 if there is no palette)

Return Value

Returns True (nonzero) if successful, otherwise returns False (0).

Explanation

The DibFromBitmap method converts a Device Dependent Bitmap to a Device Independent Bitmap. If successful, the image handle is set in the LayerNo property (ImageHandle property or Layer(LayerNo).ImageHandle property).

This method can be used to retrieve an image from VisualBasic PictureBox.

Note: The argument hBm is not freed after executing this method.


In Visual Basic:

  ' Retrieve a raster image from a PictureBox

  Set Picture1.Picture = LoadPicture("C:\Bmp\001.bmp")

  ' Image Processing 1

  ImageKit1.LayerNo = -1

  ImageKit1.DibFromBitmap Picture1.Picture.Handle, Picture1.Picture.hPal

  ' Image Processing 2

  

 

The ImageKit8 ActiveX is a product created by Newtone Corporation