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. |
| [in] fileName |
The complete path and filename of the picture file to load. |
| [in] res |
Image resolution in DPI. |
On success, an image event is fired for the "File" sensor.
C++
int __stdcall GrCapLoadImageFromFile(char* fileName, int res);
Delphi
function GrCapLoadImageFromFile(filename: String; res: Integer): Integer; stdcall;
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;