Accusoft.FormFix5.Net - Updated
FromHbitmap Method




Accusoft.FormFixSdk Namespace > FormImage Class : FromHbitmap Method
The WIN32 HBITMAP handle to copy into the new object.
A reference to the FormFix workspace object.
Creates a new object and places a copy of the given image into it.
Syntax
'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
) 
public:
static FormImage^ FromHbitmap( 
   IntPtr bitmap,
   FormFix^ workspace
) 

Parameters

bitmap
The WIN32 HBITMAP handle to copy into the new object.
workspace
A reference to the FormFix workspace object.

Return Value

A new FormImage object that contains a copy of the original image.
Remarks

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.

See Also

Reference

FormImage Class
FormImage Members