Griaule Biometrics

Home » Fingerprint SDK 2009 Developer's Manual » Programming Reference Guide » Fingerprint SDK DLL Reference Guide » Capture functions » GrCapLoadImageFromFile

GrCapLoadImageFromFile

Loads a grayscale fingerprint image from a picture file.

Prerequisites The capture module must have been previously initialized.
Picture file must be in one of the supported formats, as defined in the Image constants section.
Image capture must have been previously started on the "File" sensor.

Return On success, GR_OK is returned.
On failure, the appropriate error code is returned.

Parameters

[in] fileName

The complete path and filename of the picture file to load.

[in] res

Image resolution in DPI.

Remarks

On success, an image event is fired for the "File" sensor.

See also

Declaration

C++

int __stdcall GrCapLoadImageFromFile(char* fileName, int res);

Delphi

function GrCapLoadImageFromFile(filename: String; res: Integer): Integer; stdcall;

Sample Code

C++

// Getting the resolution.
int resolution = Convert::ToInt32(InputBox::ShowModal("What is the image resolution?", "Resolution", ""));
// Checking if the action was canceled, no value or an invalid value was entered.
if (resolution != 0)
	GrCapLoadImageFromFile(FileName,resolution);

Delphi

// Getting image resolution.
resolution := StrToInt(InputBox('What is the image resolution?', 'Resolution', ''));
// Checking if the action was canceled, no value or an invalid value was entered.
if (resolution <> 0) then begin
	GrCapLoadImageFromFile(FileName, resolution);
end;