Accusoft.FormFixSdk Namespace > FormImage Class : FromHbitmap Method |
'Declaration Public Shared Function FromHbitmap( _ ByVal bitmap As IntPtr, _ ByVal workspace As FormFix _ ) As FormImage
'Usage Dim bitmap As IntPtr Dim workspace As FormFix Dim value As FormImage value = FormImage.FromHbitmap(bitmap, workspace)
public: static FormImage* FromHbitmap( IntPtr bitmap, FormFix* workspace )
public: static FormImage^ FromHbitmap( IntPtr bitmap, FormFix^ workspace )
This method accepts a handle to a WIN32 HBITMAP and creates a new FormImage object that contains a copy of that image. The bitmap must contain a binary (1 bit per pixel) image.
Note: HBITMAP objects usually do not have a resolution. Since most of the operations this component performs require a valid resolution, you should generally avoid using this method of importing an image. If you must use it, you should always set the correct resolution immediately after importing the image. You can set the resolution using the HorizontalResolution and VerticalResolution properties of this object.
The overloaded FromHdib(IntPtr, FormFix) and FromHdib(IntPtr, Boolean, FormFix) methods are the fastest way to transfer images between Accusoft's components.