Returns a picture display handle (IPictureDisp) to the supplied raw grayscale fingerprint image with its minutiae, segments and minutiae direction drawn.
| Prerequisites | The Fingerprint SDK library must have been previously initialized. |
| Return | On success, GR_OK is returned. On failure, the appropriate error code is returned. |
| [in] tpt |
Template corresponding to the raw grayscale fingerprint image supplied. |
| [in] rawImage |
A raw grayscale fingerprint image. |
| [in] width |
Fingerprint image width in pixels. |
| [in] height |
Fingerprint image height in pixels. |
| [in] res |
Fingerprint image resolution in DPI. |
| [in] hdc |
The device context handle (HDC) in which the picture will be created. |
| [out] handle |
The fingerprint picture display handle (IPictureDisp). |
| [in] matchContext |
To have only the minutiae, segments and minutiae direction of the supplied fingerprint drawn, this parameter must be GR_NO_CONTEXT. |
C++ .NET
int BiometricDisplay (ref byte[] tptQuery,ref object rawImage, int width, int height, int hdc, ref stdole.IPictureDisp handle, int matchContext)
C#
int BiometricDisplay (ref Array tptQuery,ref Object rawImage, int width, int height, int hdc, ref stdole.IPictureDisp handle, int matchContext)
VB6
Function BiometricDisplay (ByRef tptQuery() As Byte, ByRef rawImage As Variant, ByVal width As Long, ByVal height As Long, ByVal hdc As Long, ByRef handle As IPictureDisp, ByVal matchContext As Long) As Long
VB .NET
Function BiometricDisplay (ByRef tptQuery As Array, ByRef rawImage As Object, ByVal width As Integer, ByVal height As Integer, ByVal hdc As Integer, ByRef handle As stdole.IPictureDisp, ByVal matchContext As Integer) As Long
Delphi
function BiometricDisplay(var tptQuery: PSafeArray; var rawImage: OleVariant; width: Integer; height: Integer; res: Integer; hdc: integer; var handler: IPictureDisp; matchContext: Integer): Integer;
C++ .NET
// the template class
__gc class TTemplate {
public:
// Template data.
System::Byte _tpt[];
// Template size
int _size; TTemplate(void);
~TTemplate(void);
};
// Raw image data type.
__gc struct TRawImage {
// Image data.
System::Object *img;
// Image width.
unsigned int width;
// Image height.
unsigned int height;
// Image resolution.
int Res;
};
stdole::IPictureDisp *handle;
// screen HDC
Graphics *g = _btEnroll->CreateGraphics();
IntPtr hdc = g->GetHdc();
_grfingerx->BiometricDisplay(&_tpt->_tpt, &_raw->img, _raw->width, _raw->height, _raw->Res, hdc.ToInt32(), &handle, context);
if (handle != NULL) {
Image *curImage = System::Drawing::Image::FromHbitmap(handle->Handle);
_pbPic->Image = curImage;
_pbPic->Update();
}
g->ReleaseHdc(hdc);
C#
public class TTemplate
{
// Template data.
public Array _tpt;
// Template size
public int _size;public TTemplate(){
// Create a byte buffer for the template
_tpt = new byte[(int)GRConstants.GR_MAX_SIZE_TEMPLATE];
_size = 0;
}
}// Raw image data type.
public struct TRawImage
{
// Image data.
public object img;
// Image width.
public int width;
// Image height.
public int height;
// Image resolution.
public int Res;
};IPictureDisp handle = null;
// screen HDC
IntPtr hdc = GetDC(System.IntPtr.Zero);_grfingerx.BiometricDisplay(ref _tpt._tpt, ref raw.img, _raw.width, _raw.height, _raw.Res,hdc.ToInt32(), ref handle,(int)contextId);
// draw image on picture box
if (handle != null)
{
_pbPic.Image = GrFingerXSampleCS.
ImageConverter.IpictureToImage(handle);
_pbPic.Update();
}
ReleaseDC(System.IntPtr.Zero,hdc);
VB6
' Raw image data type.
Public Type rawImage
' Image data.
img As Variant
' Image width.
width As Long
' Image height.
height As Long
' Image resolution.
res As Long
End Type' Template data Type
Public Type TTemplate
' Template data
tpt() As Byte
' Template size
Size As Long
End TypeDim handle As IPictureDisp
GrFingerXCtrl1.biometricDisplay template.tpt, raw.img, raw.width, raw.height, raw.res, formMain.hDC, handle, context
If Not (handle Is Nothing) Then
img.Picture = handle
End If
VB .NET
' Template data
Public Class TTemplate
' Template itself
Public tpt(GrFingerXLib.GRConstants.GR_MAX_SIZE_TEMPLATE) As Byte
' Template size
Public Size As Long
End Class' Raw image data type.
Public Structure RawImage
' Image data.
Public img As Object
' Image width.
Public width As Long
' Image height.
Public height As Long
' Image resolution.
Public res As Long
End Structure' handle to finger image
Dim handle As stdole.IPictureDisp = Nothing
' screen HDC
Dim hdc = GetDC(0)_GrFingerX.BiometricDisplay(template.tpt, raw.img, raw.width, raw.height, raw.res, hdc, handle, context)
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
type
// Raw image data type.
TRawImage = record
// Image data.
img: OleVariant;
// Image width.
width: Integer;
// Image height.
Height: Integer;
// Image resolution.
Res: Integer;
end;// Define a type to temporary storage of template
TTemplate = class
public
// Template data.
tpt: PSafeArray;
// Template size
size: Integer;
// Template ID (if retrieved from DB)
id: Integer;var
// handle to finger image
handle: IPictureDisp;
// screen HDC
hdc: LongInt;
begin
GrFingerXCtrl1.BiometricDisplay(template.tpt,raw.img, raw.width, raw.height,raw.Res, hdc, handle, context)
if handle <> nil then
begin
SetOlePicture(image.Picture, handle);
image.Repaint();
end;// release screen HDC
ReleaseDC(HWND(nil), hdc);