Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Declaration

HRESULT savePic([in, out] BSTR* pic, [in] BSTR ext, [in] VARIANT_BOOL withBG, [out, retval] VARIANT_BOOL* Value);

Description

Use this function to save the picture of the signature (without the background picture if set) to a file specified in pic. You may set the filname to *.bmp or *.jpg. There are Options to enable cropping and stretching of the signature image, they have to be set before startCatpure, see Driver Options

Important: call this before you call stopRead. StopRead is deleting the picture of the last signature.

Arguments

pic

File name to save signature image to. May be either *.bmp or *.jpg

If you write "instr" into the variable ext you will get the bitmap back in the variable pic as a string. The picture will not be saved to a file in that case.

ext

Provides extra parameters to the function. Parameters are joined together into a single continuous string.

ParameterDescription
instrSignature is saved to string and returned in pic argument. Must be the first extra parameter, placed in the beginning of ext string.
stretch-<X>x<Y>Scales signature up to the size of signature field.
fit-<X>x<Y>Overrides signature field size.
base64When image is saved to string (instr), saves image as base-64 encoded string.

         Example #1 of ext parameter string: "stretch-1024x768"

 Example #2 of ext parameter string: "fit-1024x768"


withBG

Reserved for future use.

Return value

Function returns true on success, false on failure.


Sample

C#
//	If the signaturimage should be cropped, you need to set the following option before startCapture 
 
const int DRIVER_OPTION1_CROP_SIGNATURE = 0x00010000; 
SigDev.SetDriverLong(0, SigDev.GetDriverLong(0) | DRIVER_OPTION1_CROP_SIGNATURE); 
 
//	Save Image with Size of 300x200, in case you enabled cropping the resolution depends of the signature
       
string path = @"c:\temp\signature.bmp";
SigDev.savePic(ref path, "stretch-300x200", true);
  • No labels