![]() |
SignDoc SDK (C)
5.0.0
|
Parameters for saving images, converting images to bi-level images, and rendering biometric signatures as images. More...
#include <SignDocSDK-c.h>
Public Member Functions | |
struct SIGNDOC_ImageParameters * | SIGNDOC_ImageParameters_new (struct SIGNDOC_Exception **aEx) |
SIGNDOC_ImageParameters constructor. More... | |
void | SIGNDOC_ImageParameters_delete (struct SIGNDOC_ImageParameters *aObj) |
SIGNDOC_ImageParameters destructor. More... | |
struct SIGNDOC_ImageParameters * | SIGNDOC_ImageParameters_clone (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_ImageParameters *aSource) |
Clone a SIGNDOC_ImageParameters object. More... | |
void | SIGNDOC_ImageParameters_assign (struct SIGNDOC_Exception **aEx, struct SIGNDOC_ImageParameters *aObj, const struct SIGNDOC_ImageParameters *aSource) |
SIGNDOC_ImageParameters assignment operator. More... | |
void | SIGNDOC_ImageParameters_clear (struct SIGNDOC_Exception **aEx, struct SIGNDOC_ImageParameters *aObj) |
Unset all parameters. More... | |
int | SIGNDOC_ImageParameters_getType (struct SIGNDOC_Exception **aEx, const char *aName) |
Get the type of a parameter. More... | |
int | SIGNDOC_ImageParameters_setBoolean (struct SIGNDOC_Exception **aEx, struct SIGNDOC_ImageParameters *aObj, const char *aName, SIGNDOC_Boolean aValue) |
Set a boolean parameter. More... | |
int | SIGNDOC_ImageParameters_setInteger (struct SIGNDOC_Exception **aEx, struct SIGNDOC_ImageParameters *aObj, const char *aName, int aValue) |
Set an integer parameter. More... | |
int | SIGNDOC_ImageParameters_setNumber (struct SIGNDOC_Exception **aEx, struct SIGNDOC_ImageParameters *aObj, const char *aName, double aValue) |
Set a floating-point number parameter. More... | |
int | SIGNDOC_ImageParameters_setString (struct SIGNDOC_Exception **aEx, struct SIGNDOC_ImageParameters *aObj, int aEncoding, const char *aName, const char *aValue) |
Set a string parameter. More... | |
int | SIGNDOC_ImageParameters_setColor (struct SIGNDOC_Exception **aEx, struct SIGNDOC_ImageParameters *aObj, const char *aName, const struct SIGNDOC_Color *aValue) |
Set a color parameter. More... | |
const SIGNDOC_Boolean * | SIGNDOC_ImageParameters_getBoolean (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_ImageParameters *aObj, const char *aName) |
Get the value of a boolean parameter. More... | |
const int * | SIGNDOC_ImageParameters_getInteger (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_ImageParameters *aObj, const char *aName) |
Get the value of an integer parameter. More... | |
const double * | SIGNDOC_ImageParameters_getNumber (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_ImageParameters *aObj, const char *aName) |
Get the value of a floating-point number parameter. More... | |
const char * | SIGNDOC_ImageParameters_getString (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_ImageParameters *aObj, const char *aName) |
Get the value of a string parameter. More... | |
struct SIGNDOC_Color * | SIGNDOC_ImageParameters_getColor (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_ImageParameters *aObj, const char *aName) |
Get the value of a color parameter. More... | |
const char * | SIGNDOC_ImageParameters_getErrorMessage (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_ImageParameters *aObj, int aEncoding) |
Get an error message for the last function call. More... | |
const wchar_t * | SIGNDOC_ImageParameters_getErrorMessageW (struct SIGNDOC_Exception **aEx, const struct SIGNDOC_ImageParameters *aObj) |
Get an error message for the last function call. More... | |
Parameters for saving images, converting images to bi-level images, and rendering biometric signatures as images.
In the descriptions of a parameter, the functions that make use of that parameter are indicated by these letters in square brackets:
Parameters for selecting the image format:
Parameters for conversion to bi-level black and white:
Parameters for configuring the size of the image:
Parameters for tuning the rendering of signatures:
Parameters for adding a cross:
The "raw" format stores the pixels only, without any header or other information. Therefore, the aOutput parameter (of type SIGNDOC_RenderOutput) of SIGNDOC_SignatureData_renderAsImage() is mandatory. The following paragraphs describe the available raw formats.
If integer parameter "BitsPerComponent" is 1, integer parameter "Components" must be 1 and 8 pixels will be stored per byte. The left-most pixel is stored in the most significant bit (0x80). Padding bits are added such that each row occupies an integral number of bytes. The interpretation of the values of the bits depends on boolean parameters "BlackIsZero" and "WhiteIsZero".
If integer parameter "BitsPerComponent" is 8 and integer parameter "Components" is 1, one byte per pixel (usually the palette index) will be stored.
If integer parameter "BitsPerComponent" is 8 and integer parameter "Components" is 3, three bytes per pixel will be stored: red, green, and blue. The value 0 is used for off, the value 0xff is used for on. The pixel format can be changed by setting string parameter "PixelFormat".
Depending on boolean parameter "BottomUp", the raw image begins with the left-most pixel of the top row (SIGNDOC_FALSE) or with the left-most pixel of the bottom row (SIGNDOC_TRUE).
void SIGNDOC_ImageParameters_assign | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_ImageParameters * | aObj, | ||
const struct SIGNDOC_ImageParameters * | aSource | ||
) |
SIGNDOC_ImageParameters assignment operator.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aSource | The source object. |
void SIGNDOC_ImageParameters_clear | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_ImageParameters * | aObj | ||
) |
Unset all parameters.
struct SIGNDOC_ImageParameters * SIGNDOC_ImageParameters_clone | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_ImageParameters * | aSource | ||
) |
Clone a SIGNDOC_ImageParameters object.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aSource | The object to be copied. |
void SIGNDOC_ImageParameters_delete | ( | struct SIGNDOC_ImageParameters * | aObj | ) |
SIGNDOC_ImageParameters destructor.
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
const SIGNDOC_Boolean * SIGNDOC_ImageParameters_getBoolean | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_ImageParameters * | aObj, | ||
const char * | aName | ||
) |
Get the value of a boolean parameter.
This function does not set an error message.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aName | The name of the parameter (case-sensitive). |
struct SIGNDOC_Color * SIGNDOC_ImageParameters_getColor | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_ImageParameters * | aObj, | ||
const char * | aName | ||
) |
Get the value of a color parameter.
This function does not set an error message.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aName | The name of the parameter (case-sensitive). |
const char * SIGNDOC_ImageParameters_getErrorMessage | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_ImageParameters * | aObj, | ||
int | aEncoding | ||
) |
Get an error message for the last function call.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aEncoding | The encoding to be used for the error message (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
const wchar_t * SIGNDOC_ImageParameters_getErrorMessageW | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_ImageParameters * | aObj | ||
) |
Get an error message for the last function call.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
const int * SIGNDOC_ImageParameters_getInteger | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_ImageParameters * | aObj, | ||
const char * | aName | ||
) |
Get the value of an integer parameter.
This function does not set an error message.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aName | The name of the parameter (case-sensitive). |
const double * SIGNDOC_ImageParameters_getNumber | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_ImageParameters * | aObj, | ||
const char * | aName | ||
) |
Get the value of a floating-point number parameter.
This function does not set an error message.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aName | The name of the parameter (case-sensitive). |
const char * SIGNDOC_ImageParameters_getString | ( | struct SIGNDOC_Exception ** | aEx, |
const struct SIGNDOC_ImageParameters * | aObj, | ||
const char * | aName | ||
) |
Get the value of a string parameter.
This function does not set an error message.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aName | The name of the parameter (case-sensitive). |
int SIGNDOC_ImageParameters_getType | ( | struct SIGNDOC_Exception ** | aEx, |
const char * | aName | ||
) |
Get the type of a parameter.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aName | The name of the parameter (case-sensitive). |
struct SIGNDOC_ImageParameters * SIGNDOC_ImageParameters_new | ( | struct SIGNDOC_Exception ** | aEx | ) |
SIGNDOC_ImageParameters constructor.
No parameters will be set.
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
int SIGNDOC_ImageParameters_setBoolean | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_ImageParameters * | aObj, | ||
const char * | aName, | ||
SIGNDOC_Boolean | aValue | ||
) |
Set a boolean parameter.
Available boolean parameters are:
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aName | The name of the parameter (case-sensitive). |
[in] | aValue | The value of the parameter. |
int SIGNDOC_ImageParameters_setColor | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_ImageParameters * | aObj, | ||
const char * | aName, | ||
const struct SIGNDOC_Color * | aValue | ||
) |
Set a color parameter.
Available color parameters are:
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aName | The name of the parameter (case-sensitive). |
[in] | aValue | The value of the parameter. |
int SIGNDOC_ImageParameters_setInteger | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_ImageParameters * | aObj, | ||
const char * | aName, | ||
int | aValue | ||
) |
Set an integer parameter.
Available integer parameters are:
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aName | The name of the parameter (case-sensitive). |
[in] | aValue | The value of the parameter. |
int SIGNDOC_ImageParameters_setNumber | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_ImageParameters * | aObj, | ||
const char * | aName, | ||
double | aValue | ||
) |
Set a floating-point number parameter.
Available floating-point number parameters are:
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aName | The name of the parameter (case-sensitive). |
[in] | aValue | The value of the parameter. |
int SIGNDOC_ImageParameters_setString | ( | struct SIGNDOC_Exception ** | aEx, |
struct SIGNDOC_ImageParameters * | aObj, | ||
int | aEncoding, | ||
const char * | aName, | ||
const char * | aValue | ||
) |
Set a string parameter.
Available string parameters are:
[out] | aEx | Any exception will be returned in the object pointed to by this parameter. |
[in] | aObj | A pointer to the SIGNDOC_ImageParameters object. |
[in] | aEncoding | The encoding used for aValue (SIGNDOC_ENCODING_NATIVE, SIGNDOC_ENCODING_UTF_8, or SIGNDOC_ENCODING_LATIN_1). |
[in] | aName | The name of the parameter (case-sensitive). |
[in] | aValue | The value of the parameter. The encoding is specified by aEncoding. |