Returns a picture display handle (IPictureDisp) to the supplied raw grayscale fingerprint image.
| Prerequisites | A valid license must exist on system. |
| Return | On success, GR_OK is returned. On failure, the appropriate error code is returned. |
| [in] rawImage |
A raw grayscale fingerprint image. |
| [in] width |
Fingerprint image width in pixels. |
| [in] height |
Fingerprint image height in pixels. |
| [in] hdc |
The device context handle (HDC) in which the picture will be created. |
| [out] handle |
The fingerprint picture display handle (IPictureDisp). |
C++ .NET
int CapRawImageToHandle (ref object RawImage, int width, int height, int hdc, ref stdole.IPictureDisp handler)
C#
int CapRawImageToHandle (ref Object RawImage, int width, int height, int hdc, ref stdole.IPictureDisp handler)
VB6
Function CapRawImageToHandle (ByRef RawImage As Variant, ByVal width As Long, ByVal height As Long, ByVal hdc As Long, ByRef handler As IPictureDisp) As Long
VB .NET
Function CapRawImageToHandle (ByRef RawImage As Object, ByVal width As Integer, ByVal height As Integer, ByVal hdc As Integer, ByRef handler As stdole.IPictureDisp) As Integer
Delphi
function CapRawImageToHandle(var rawImage: OleVariant; width, height: integer; hdc: HDC; var handler: IPictureDisp): integer;
C++ .NET
stdole::IPictureDisp *handle;
// screen HDC
Graphics *g = _btEnroll->CreateGraphics();
IntPtr hdc = g->GetHdc();
_grfingerx->CapRawImageToHandle(&_raw->img, _raw->width, _raw->height, hdc.ToInt32(), &handle);
if (handle != NULL) {
Image *curImage = System::Drawing::Image::FromHbitmap(handle->Handle);
_pbPic->Image = curImage;
_pbPic->Update();
}
g->ReleaseHdc(hdc);
C#
IPictureDisp handle = null;
// screen HDC
IntPtr hdc = GetDC(System.IntPtr.Zero);
_grfingerx.CapRawImageToHandle(ref _raw.img,_raw.width,_raw.height, hdc.ToInt32(), ref handle);
// draw image on picture box
if (handle != null)
{
_pbPic.Image = GrFingerXSampleCS.
ImageConverter.IpictureToImage(handle);
_pbPic.Update();
}
ReleaseDC(System.IntPtr.Zero,hdc);
VB6
Dim handle As IPictureDisp
GrFingerXCtrl1.CapRawImageToHandle raw.img, raw.width, raw.height, formMain.hDC, handle
If Not (handle Is Nothing) Then
img.Picture = handle
End If
VB .NET
' handle to finger image
Dim handle As stdole.IPictureDisp = Nothing
' screen HDC
Dim hdc = GetDC(0)
_GrFingerX.CapRawImageToHandle(raw.img, raw.width, raw.height, hdc, handle)
If Not (handle Is Nothing) Then
_pbPic.Image = Image.FromHbitmap(New IntPtr(handle.Handle), New IntPtr(handle.hPal))
_pbPic.Update()
End If
' release screen HDC
ReleaseDC(0, hdc)
Delphi
var
// handle to finger image
handle: IPictureDisp;
// screen HDC
hdc: LongInt;
begin
GrFingerXCtrl1.CapRawImageToHandle(raw.img, raw.width, raw.height, hdc, handle);
if handle <> nil then
begin
SetOlePicture(image.Picture, handle);
image.Repaint();
end;// release screen HDC
ReleaseDC(HWND(nil), hdc);