Luxand FaceSDK – Working With Images

Images are represented as the HImage data type.

C++ Declaration:

typedef int HImage;

Delphi Declaration:

HImage = integer;
PHImage = ^HImage;

FaceSDK provides a number of functions to load images to the internal representation from files or HBitmap handles and to save images from the internal representation to files and HBitmap handles.

FSDK_LoadImageFromFile Function

Loads the image from a file and provides the internal handle of this image.

C++ Syntax:

int _FSDKIMPORT_ FSDK_LoadImageFromFile(HImage* Image, char* FileName);

Delphi Syntax:

function FSDK_LoadImageFromFile(Image: PHImage; FileName: PChar): integer; cdecl; external 'FaceSDK.dll';

Parameters:

Image – the pointer to HImage for receiving the loaded image handle.

FileName – the filename of the image to be loaded. FaceSDK supports the JPG, PNG, BMP and GIF file formats.

Return Value:

The function returns FSDK_OK if successful.

FSDK_LoadImageFromHBitmap Function

Loads the image from an HBitmap handle and provides the internal handle of this image.

C++ Syntax:

int _FSDKIMPORT_ FSDK_LoadImageFromHBitmap(HImage* Image, HBITMAP* BitmapHandle);

Delphi Syntax:

function FSDK_LoadImageFromHBitmap(Image: PHImage; BitmapHandle: HBitmap): integer; cdecl; external 'FaceSDK.dll';

Parameters:

Image – the pointer to HImage for receiving the loaded image handle.

BitmapHandle – the handle of the image to be loaded.

Return Value:

The function returns FSDK_OK if successful.

FSDK_SaveImageToFile Function

Saves an image to a file.

C++ Syntax:

int _FSDKIMPORT_ FSDK_SaveImageToFile(HImage Image, char* FileName);

Delphi Syntax:

function FSDK_SaveImageToFile(Image: HImage; FileName: PChar): integer; cdecl; external 'FaceSDK.dll';

Parameters:

Image – the internal handle of the image to be saved.

FileName – the name of the file the image will be saved to. FaceSDK saves images in the .BMP file format.

Return Value:

The function returns FSDK_OK if successful.

FSDK_SaveImageToHBitmap Function

Creates an HBitmap handle containing the image.

C++ Syntax:

int _FSDKIMPORT_ FSDK_SaveImageToHBitmap(HImage Image, HBITMAP* BitmapHandle);

Delphi Syntax:

function FSDK_SaveImageToHBitmap(Image: HImage; BitmapHandle: PHBitmap): integer; cdecl; external 'FaceSDK.dll';

Parameters:

Image – the internal handle of the image to be saved to HBitmap.

BitmapHandle – the pointer to HBitmap the created HBitmap handle will be saved to.

Return Value:

The function returns FSDK_OK if successful.

FSDK_FreeImage Function

Frees the internal representation of an image.

C++ Syntax:

int _FSDKIMPORT_ FSDK_FreeImage(HImage Image);

Delphi Syntax:

function FSDK_FreeImage(Image: HImage): integer; cdecl; external 'FaceSDK.dll';

Parameters:

Image – the handle of the image to be freed.

Return Value:

The function returns FSDK_OK if successful.

Search

Solutions   |   Products   |   Download   |   Support   |   Development   |   Press   |   About Luxand © 2005-2008 Luxand Development