Property ReadSignatureImageOptions
ReadSignatureImageOptions
Provides options for changing the signature image processing. Setting options may raise SignImgChanged.
Declaration
IReadSignatureImageOptions ReadSignatureImageOptions { get; }
Property Value
Type | Description |
---|---|
IReadSignatureImageOptions | Contains setters for the options. See IReadSignatureImageOptions. |
Examples
The following example
- makes the background transparent,
- changes the linecolor to red,
- combines cropping (crops the image to the bounding box of the signature line) with a subsequent resizing that keeps the aspect ratio constant and
- aligns the resulting image with the upper left corner of the box defined by (width, height) given as first arguments to ReadSignatureImage(Int32, Int32, out Bitmap)
C#
IReadSignatureImageOptions imageOptions = driver.ReadSignatureImageOptions;
imageOptions.LineColor = Color.Red;
imageOptions.BackgroundColor = Color.Transparent;
imageOptions.ResizeOptions = ResizeOptions.Crop | ResizeOptions.KeepAspectRatio;
imageOptions.Alignment = Alignments.TopLeft;
int width = 600;
int height = 400;
driver.ReadSignatureImage(width, height, out Bitmap image);
// for example
// image.Save("signatureImage.png", ImageFormat.Png);
VB.NET
Dim imageOptions As IReadSignatureImageOptions = driver.ReadSignatureImageOptions
imageOptions.LineColor = Color.Red
imageOptions.BackgroundColor = Color.Transparent
imageOptions.ResizeOptions = ResizeOptions.Crop Or ResizeOptions.KeepAspectRatio
imageOptions.Alignment = Alignments.TopLeft
Dim width As Integer = 600
Dim height As Integer = 400
Dim image As Bitmap
driver.ReadSignatureImage(width, height, image)
' for example
' image.Save("signatureImage.png", Imaging.ImageFormat.Png)