visit Kofax web site

ACTIVESWLib::ISPImage Interface Reference


Detailed Description

SignWare Dynamic Development toolkit, ActiveX wrapper for SPImageInterface ISPImage.

The ISPImage object implements a representation of a static image. The image may be loaded from a color, a gray-scale or a black-and-white image, most image formats can be read, such as tiff, jpeg, png, gif and many more. The ISPImage object can load indexed color images, however the saved image will be converted to a true color image.

The ISPImage object includes methods to perform signature cleaning, cleaning funtionality is optimized for signature snippets which are typically gray-scale or black-and-white regions of a scanned image that include the handwritten signature. Cleaning methods cannot be applied to color images.

Note:
All cleaning functions allow a maximum image size of 1280 * 960 pixel. This also affects GetComplexity and Invert when using the flag SP_INVERT_ENGINE.
The ISPImage object contains methods to draw text, rectangles or images on the target image, e. g. to dynamically compose a tablet background image.


Public Member Functions

HRESULT Binarize ([in] long lMethod,[in] long lThreshold,[out, retval] long *result)
 Binarize the picture in this image object.
HResult Brightness ([in] double fGray,[in] double fGreen,[in] double fBlue,[out, retval] long *result)
 Change the brightness of the image.
HRESULT CleanBatch ([in] ISPCleanParameter *pParameter,[out, retval] long *result)
 Clean an image based on the parameters provided.
HRESULT CleanDate ([out] long *piLeft,[out] long *piTop,[out] long *piRight,[out] long *piBottom,[out, retval] long *result)
 Clean handwritten text in an image.
HRESULT CleanFrames ([in] double dTrust,[out, retval] long *result)
 Delete all frames which are weighted less than dTrust.
HRESULT CleanLines ([out, retval] long *result)
 Clean lines in a BW or a gray image.
HRESULT CleanSignature ([out] long *piLeft,[out] long *piTop,[out] long *piRight,[out] long *piBottom,[out, retval] long *result)
 Clean a signature image.
HRESULT Clone ([out] ISPImage **ppImage,[out, retval] long *result)
 Create a copy of this object.
HResult Contrast ([in] double fGray,[in] double fGreen,[in] double fBlue,[out, retval] long *result)
 Change the contrast of the image.
HRESULT Create ([out, retval] long *result)
 Create the image instance.
HRESULT DrawImage ([in] BSTR bstrXMLImage,[out, retval] long *result)
 Draw some images on the image.
HRESULT DrawImageFlatFile ([in] ISPFlatFile *bstrXMLImage,[out, retval] long *result)
 Draw some images on the image.
HRESULT DrawObject ([in] BSTR bstrXMLObject,[out, retval] long *result)
 Draw some images, text and rectangles on the image.
HRESULT DrawObjectFlatFile ([in] ISPFlatFile *bstrXMLObject,[out, retval] long *result)
 Draw some images, text and rectangles on the image.
HRESULT DrawRect ([in] BSTR bstrXMLRect,[out, retval] long *result)
 Draw some rectangles on the image.
HRESULT DrawRectFlatFile ([in] ISPFlatFile *bstrXMLRect,[out, retval] long *result)
 Draw some rectangles on the image.
HRESULT DrawText ([in] BSTR bstrXMLText,[out, retval] long *result)
 Draw some text on the image.
HRESULT DrawTextFlatFile ([in] ISPFlatFile *bstrXMLText,[out, retval] long *result)
 Draw some text on the image.
HRESULT GetBitsPerPixel ([out] long *piBitsPerPixel,[out, retval] long *result)
 Query the number of bits per pixel (color resolution) of this image object [in dpi].
HRESULT GetColorImageData ([out] SAFEARRAY(UINT)*ppData,[out, retval] long *result)
 Query the image data.
HRESULT GetComplexity ([out] long *piComplexity,[out, retval] long *result)
 Query the complexity of the image contained in this object.
HRESULT GetDefaultBinarizeParams ([out] long *plMethod,[out] long *plThreshold,[out, retval] long *result)
 Query the default threshold to binarize images, see sec_Cleaning.
HRESULT GetFrames ([out] ISPWeightedFrames **pFrames,[out, retval] long *result)
 Query all frames and their weights in this image.
HRESULT GetImageData ([out] SAFEARRAY(BYTE)*ppData,[out, retval] long *result)
 Query the image data.
HRESULT GetPixel ([in] long iX,[in] long iY,[out] long *piGray,[out, retval] long *result)
 Query a pixel at location iX, iY.
HRESULT GetResolution ([out] long *plResolution,[out, retval] long *result)
 Query the resolution of this image object.
HRESULT GetSignatureRegion ([in] long iFlags,[out] long *piLeft,[out] long *piTop,[out] long *piRight,[out] long *piBottom,[out, retval] long *result)
 Query the signature region within this image.
HRESULT GetSize ([out] long *plWidth,[out] long *plHeight,[out, retval] long *result)
 Query the size of this image object.
HRESULT GetSplitPositions ([out] SAFEARRAY(LONG)*ppSplits,[out, retval] long *result)
 Query possible split positions in the image. The method analyses the image and checks for word boundaries.
HRESULT Invert ([in] long iFlags,[out, retval] long *result)
 Invert the image.
HRESULT MaskImage ([in] ISPImage *pMask,[in] long iLeft,[in] long iTop,[in] long iRight,[in] long iBottom,[in] long iFlags,[out, retval] long *result)
 Mask this image with the contents of spImage.
HRESULT Mirror ([in] long iAxes,[out, retval] long *result)
 Mirror the image.
HRESULT Region ([in] long iLeft,[in] long iTop,[in] long iRight,[in] long iBottom,[out, retval] long *result)
 Cut the image to a region.
HResult Resize ([in] long iResolution,[in] long iAlgo,[out, retval] long *result)
 Resize the image.
HRESULT Rotate ([in] long iAngle,[out, retval] long *result)
 Rotate the image.
HRESULT SetBitmap ([in] ISPFlatFile *pBitmap,[in] long iPage,[out, retval] long *result)
 Copy the picture contained in pBitmap into the image object.
HRESULT SetBitsPerPixel ([in] long iBitsPerPixel,[out, retval] long *result)
 Set the number of bits per pixel (color resolution) of this image object [in dpi].
HRESULT SetBitsPerPixel2 ([in] long iBitsPerPixel,[in] SAFEARRAY(LONG)*iColorPalette,[out, retval] long *result)
 Set the number of bits per pixel (color resolution) of this image object [in dpi].
HRESULT SetDefaultBinarizeParams ([in] long lMethod,[in] long lThreshold,[out, retval] long *result)
 Set the default binarization threshold, see sec_Cleaning.
HRESULT SetEmpty ([in] long iWidth,[in] long iHeight,[in] long iColor,[in] long iResolution,[out, retval] long *result)
 Set an empty image.
HRESULT SetEmpty2 ([in] long iWidth,[in] long iHeight,[in] long iColor,[in] long iResolution,[in] long iBitsPerPixel,[out, retval] long *result)
 Set an empty image.
HRESULT SetPixel ([in] long iX,[in] long iY,[in] long iGray,[out, retval] long *result)
 Set a pixel at location iX, iY.
HRESULT SetReference ([in] ISPReference *pReference,[in] long iIndex,[out, retval] long *result)
 Copy the picture contained in a reference at index into the image object.
HRESULT SetReference2 ([in] ISPReference *pReference,[in] long iIndex,[in] ISPTicket *pTicket,[out, retval] long *result)
 Copy the picture contained in a reference at index into the image object.
HRESULT SetResolution ([in] long iRes,[out, retval] long *result)
 Overwrite the resolution of a picture in a SPIMAGE_T object.
HRESULT SetSignature ([in] ISPSignature *pSignature,[out, retval] long *result)
 Copy the picture contained in a signature into the image object.
HRESULT SetSignature2 ([in] ISPSignature *pSignature,[in] ISPTicket *pTicket,[out, retval] long *result)
 Copy the picture contained in a signature into the image object.
HRESULT SetTellerImage ([in] ISPTellerImage *pTellerImage,[out, retval] long *result)
 Copy the picture contained in a teller image into the image object.
HRESULT SetTemplate ([in] ISPTemplate *pTemplate,[out, retval] long *result)
 Copy the picture contained in a template into the image object.
HRESULT SetTemplate2 ([in] ISPTemplate *pTemplate,[in] ISPTicket *pTicket,[out, retval] long *result)
 Copy the picture contained in a template into the image object.


Member Function Documentation

HRESULT ACTIVESWLib::ISPImage::Binarize [in] long  lMethod,
[in] long  lThreshold,
[out, retval] long *  result
 

Binarize the picture in this image object.

Parameters:
lMethod [i] binarize method, implemented methods include:
  • 0 set the threshold to iThreshold
  • 1 set the threshold iThreshold gray levels above the histogram peak
  • 2 set the threshold iThreshold gray levels above nex minimum relative to the histogram peak
lThreshold [i] binarization threshold to binarize a gray picture into a black-white picture.
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageBinarize
Note:
The pictures are expected writing black strokes on white background, and with a gray level 255 equals white. The Binarization will invert the picture if the background in black.

the picture may be inverted after this operation

HResult ACTIVESWLib::ISPImage::Brightness [in] double  fGray,
[in] double  fGreen,
[in] double  fBlue,
[out, retval] long *  result
 

Change the brightness of the image.

Parameters:
fGray [i] brightness factor for the gray channel of the image. If the image is a color image then fGray applies to the red channel
fGreen [i] brightness factor for the green channel of the image, if the image is a color image. pass -1.0 to apply fGray to the green channel
fBlue [i] brightness factor for the blue channel of the image, if the image is a color image. pass -1.0 to apply fGray to the blue channel
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
See also:
SPImageBrightness

HRESULT ACTIVESWLib::ISPImage::CleanBatch [in] ISPCleanParameter pParameter,
[out, retval] long *  result
 

Clean an image based on the parameters provided.

Parameters:
pParameter [i] Parameters used for cleaning
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
This is a compact call to perform any combination of cleaning, please see sec_Cleaning for details.
See also:
SPImageCleanBatch

HRESULT ACTIVESWLib::ISPImage::CleanDate [out] long *  piLeft,
[out] long *  piTop,
[out] long *  piRight,
[out] long *  piBottom,
[out, retval] long *  result
 

Clean handwritten text in an image.

For an overview on image cleaning see sec_Cleaning

Parameters:
piLeft [o] will be filled with the left position of the signature coordinates. You may pass NULL if the coordinates are not desired.
piTop [o] will be filled with the top position of the signature coordinates. You may pass NULL if the coordinates are not desired.
piRight [o] will be filled with the right position of the signature coordinates. You may pass NULL if the coordinates are not desired.
piBottom [o] will be filled with the bottom position of the signature coordinates. You may pass NULL if the coordinates are not desired.
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
If this image is a gray image then this function will create a BW image, clean the BW image and finally mask this image with the BW.
If this image is a BW image this function will directly clean this image.
SPImageCleanData will clean handwritten text such as date etc.
See also:
SPImageCleanDate

HRESULT ACTIVESWLib::ISPImage::CleanFrames [in] double  dTrust,
[out, retval] long *  result
 

Delete all frames which are weighted less than dTrust.

For an overview on image cleaning see sec_Cleaning

Parameters:
dTrust [i] the weighting factor, range 0.0 .. 1.0, 0.0 will delete dirt, 1.0 will delete the entire image
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
If this image is a gray image then this function will create a BW image, clean frames in the BW image and finally mask this image with the BW.
If this image is a BW image this function will directly clean this image.
See also:
SPImageCleanFrames

HRESULT ACTIVESWLib::ISPImage::CleanLines [out, retval] long *  result  ) 
 

Clean lines in a BW or a gray image.

For an overview on image cleaning see sec_Cleaning

Parameters:
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
If this image is a gray image then this function will create a BW image, clean lines in the BW image and finally mask this image with the BW.
If this image is a BW image this function will directly clean this image.
See also:
SPImageCleanLines

HRESULT ACTIVESWLib::ISPImage::CleanSignature [out] long *  piLeft,
[out] long *  piTop,
[out] long *  piRight,
[out] long *  piBottom,
[out, retval] long *  result
 

Clean a signature image.

For an overview on image cleaning see sec_Cleaning

Parameters:
piLeft [o] will be filled with the left position of the signature coordinates. You may pass NULL if the coordinates are not desired.
piTop [o] will be filled with the top position of the signature coordinates. You may pass NULL if the coordinates are not desired.
piRight [o] will be filled with the right position of the signature coordinates. You may pass NULL if the coordinates are not desired.
piBottom [o] will be filled with the bottom position of the signature coordinates. You may pass NULL if the coordinates are not desired.
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
If this image is a gray image then this function will create a BW image, clean the BW image and finally mask this image with the BW.
If this image is a BW image this function will directly clean this image.
SPImageCleanSignature will clean horizontal Lines, printed Text in the image and non signature related dirt particles
See also:
SPImageCleanSignature

HRESULT ACTIVESWLib::ISPImage::Clone [out] ISPImage **  ppImage,
[out, retval] long *  result
 

Create a copy of this object.

Parameters:
ppImage [o] pointer to the clone image
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
See also:
SPImageClone

HResult ACTIVESWLib::ISPImage::Contrast [in] double  fGray,
[in] double  fGreen,
[in] double  fBlue,
[out, retval] long *  result
 

Change the contrast of the image.

Parameters:
fGray [i] contrast factor for the gray channel of the image. If the image is a color image then fGray applies to the red channel
fGreen [i] contrast factor for the green channel of the image, if the image is a color image. pass -1.0 to apply fGray to the green channel
fBlue [i] contrast factor for the blue channel of the image, if the image is a color image. pass -1.0 to apply fGray to the blue channel
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
See also:
SPImageContrast

HRESULT ACTIVESWLib::ISPImage::Create [out, retval] long *  result  ) 
 

Create the image instance.

Parameters:
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPTellerCreate

HRESULT ACTIVESWLib::ISPImage::DrawImage [in] BSTR  bstrXMLImage,
[out, retval] long *  result
 

Draw some images on the image.

For an overview on XML tags please see sec_XML_Data

Parameters:
bstrXMLImage [i] a description of the image, position to be included
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The XML string is described in sec_XML_Data

the coordinate origin must be Image

See also:
SPImageDrawImage, DrawText, DrawRect

HRESULT ACTIVESWLib::ISPImage::DrawImageFlatFile [in] ISPFlatFile bstrXMLImage,
[out, retval] long *  result
 

Draw some images on the image.

For an overview on XML tags please see sec_XML_Data

Parameters:
bstrXMLImage [i] a description of the image, position to be included supported encodings in the XML declaration are ASCII, UTF-8 and ISO-8859-1,
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The XML string is described in sec_XML_Data

the coordinate origin must be Image

See also:
SPImageDrawImage, DrawText, DrawRect

HRESULT ACTIVESWLib::ISPImage::DrawObject [in] BSTR  bstrXMLObject,
[out, retval] long *  result
 

Draw some images, text and rectangles on the image.

For an overview on XML tags please see sec_XML_Data

Parameters:
bstrXMLObject [i] a description of the rectangle, images and text to be included
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The XML string is described in sec_XML_Data

the coordinate origin must be Image

See also:
SPImageDrawObject

HRESULT ACTIVESWLib::ISPImage::DrawObjectFlatFile [in] ISPFlatFile bstrXMLObject,
[out, retval] long *  result
 

Draw some images, text and rectangles on the image.

For an overview on XML tags please see sec_XML_Data

Parameters:
bstrXMLObject [i] a description of the rectangle, images and text to be included, supported encodings in the XML declaration are ASCII, UTF-8 and ISO-8859-1,
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The XML string is described in sec_XML_Data

the coordinate origin must be Image

See also:
SPImageDrawObject

HRESULT ACTIVESWLib::ISPImage::DrawRect [in] BSTR  bstrXMLRect,
[out, retval] long *  result
 

Draw some rectangles on the image.

For an overview on XML tags please see sec_XML_Data

Parameters:
bstrXMLRect [i] a description of the rectangle, position, image and text to be included
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The XML string is described in sec_XML_Data

the coordinate origin must be Image

See also:
SPImageDrawRect, DrawText, DrawImage

HRESULT ACTIVESWLib::ISPImage::DrawRectFlatFile [in] ISPFlatFile bstrXMLRect,
[out, retval] long *  result
 

Draw some rectangles on the image.

For an overview on XML tags please see sec_XML_Data

Parameters:
bstrXMLRect [i] a description of the rectangle, position, image and text to be included supported encodings in the XML declaration are ASCII, UTF-8 and ISO-8859-1,
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The XML string is described in sec_XML_Data

the coordinate origin must be Image

See also:
SPImageDrawRect, DrawText, DrawImage

HRESULT ACTIVESWLib::ISPImage::DrawText [in] BSTR  bstrXMLText,
[out, retval] long *  result
 

Draw some text on the image.

For an overview on XML tags please see sec_XML_Data

Parameters:
bstrXMLText [i] a description of the text, position and font to be included
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The XML string is described in sec_XML_Data

the coordinate origin must be Image

See also:
SPImageDrawText, DrawImage, DrawRect

HRESULT ACTIVESWLib::ISPImage::DrawTextFlatFile [in] ISPFlatFile bstrXMLText,
[out, retval] long *  result
 

Draw some text on the image.

For an overview on XML tags please see sec_XML_Data

Parameters:
bstrXMLText [i] a description of the text, position and font to be included supported encodings in the XML declaration are ASCII, UTF-8 and ISO-8859-1,
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The XML string is described in sec_XML_Data

the coordinate origin must be Image

See also:
SPImageDrawText, DrawImage, DrawRect

HRESULT ACTIVESWLib::ISPImage::GetBitsPerPixel [out] long *  piBitsPerPixel,
[out, retval] long *  result
 

Query the number of bits per pixel (color resolution) of this image object [in dpi].

Parameters:
piBitsPerPixel [o] pointer to a long that will be filled with the number of bits per pixel of the contained image
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageGetBitsPerPixel

HRESULT ACTIVESWLib::ISPImage::GetColorImageData [out] SAFEARRAY(UINT)*  ppData,
[out, retval] long *  result
 

Query the image data.

Parameters:
ppData [i] a pointer to a safearray that will be filled with the image data, either with elements of type VT_UI4 for color images
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
If you need to access the image data the you should call GetBitsPerPixel to determine if the pixel data fits into a byte array (BitsPerPixel <= 8) or into an int array (BitsPerPixel > 8).
See also:
GetImageData, SPImageGetImageData

HRESULT ACTIVESWLib::ISPImage::GetComplexity [out] long *  piComplexity,
[out, retval] long *  result
 

Query the complexity of the image contained in this object.

Parameters:
piComplexity [o] pointer to a long that will be filled with the complexity of the signature, range 0 (simple) .. 100 (complex)
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The returned complexity is valid only if this object contains a clean signature image
See also:
SPImageGetComplexity

HRESULT ACTIVESWLib::ISPImage::GetDefaultBinarizeParams [out] long *  plMethod,
[out] long *  plThreshold,
[out, retval] long *  result
 

Query the default threshold to binarize images, see sec_Cleaning.

Parameters:
plMethod [o] pointer to a long that will be filled with the default binarisation method
plThreshold [o] pointer to a long that will be filled with the default binarisation threshold
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetBinarizeParams

HRESULT ACTIVESWLib::ISPImage::GetFrames [out] ISPWeightedFrames **  pFrames,
[out, retval] long *  result
 

Query all frames and their weights in this image.

For an overview on image cleaning see sec_Cleaning

Parameters:
pFrames [o] a pointer to a ISPWeightedFrames pointer which will be filled with an array of ISPWeightedFrames objects.
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
The frame weights are in the range 0.0 ... 1.0. The value 0.0 equals dirt, a value of 1.0 is assigned to signature values.
See also:
SPImageGetFrames

HRESULT ACTIVESWLib::ISPImage::GetImageData [out] SAFEARRAY(BYTE)*  ppData,
[out, retval] long *  result
 

Query the image data.

Parameters:
ppData [i] a pointer to a safearray that will be filled with the image data, either with elements of type VT_UI1 for black-white and gray-scale images
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
If you need to access the image data the you should call GetBitsPerPixel to determine if the pixel data fits into a byte array (BitsPerPixel <= 8) or into an int array (BitsPerPixel > 8).
See also:
GetColorImageData, SPImageGetImageData

HRESULT ACTIVESWLib::ISPImage::GetPixel [in] long  iX,
[in] long  iY,
[out] long *  piGray,
[out, retval] long *  result
 

Query a pixel at location iX, iY.

Parameters:
iX [i] x-coordinate, 0-based
iY [i] y-coordinate, 0-based
piGray [o] pointer to a long variable that will be filled with the gray level, range 0 ... 255
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The XML string is described in sec_XML_Data

the coordinate origin must be Image

See also:
SPImageDrawObject

HRESULT ACTIVESWLib::ISPImage::GetResolution [out] long *  plResolution,
[out, retval] long *  result
 

Query the resolution of this image object.

Parameters:
plResolution [io] pointer to a long that will be filled with the resolution of the contained image
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageGetResolution

HRESULT ACTIVESWLib::ISPImage::GetSignatureRegion [in] long  iFlags,
[out] long *  piLeft,
[out] long *  piTop,
[out] long *  piRight,
[out] long *  piBottom,
[out, retval] long *  result
 

Query the signature region within this image.

For an overview on image cleaning see sec_Cleaning

Parameters:
iFlags [i] a bitwise combination of these values:
piLeft [o] will be filled with the left position of the signature coordinates. You may pass NULL if the coordinates are not desired.
piTop [o] will be filled with the top position of the signature coordinates. You may pass NULL if the coordinates are not desired.
piRight [o] will be filled with the right position of the signature coordinates. You may pass NULL if the coordinates are not desired.
piBottom [o] will be filled with the bottom position of the signature coordinates. You may pass NULL if the coordinates are not desired.
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
See also:
SPImageGetSignatureRegion

HRESULT ACTIVESWLib::ISPImage::GetSize [out] long *  plWidth,
[out] long *  plHeight,
[out, retval] long *  result
 

Query the size of this image object.

Parameters:
plWidth [o] pointer to a long that will be filled with the width of the contained image
plHeight [o] pointer to a long that will be filled with the height of the contained image
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageGetSize

HRESULT ACTIVESWLib::ISPImage::GetSplitPositions [out] SAFEARRAY(LONG)*  ppSplits,
[out, retval] long *  result
 

Query possible split positions in the image. The method analyses the image and checks for word boundaries.

For an overview on image cleaning see sec_Cleaning

Parameters:
ppSplits [o] a pointer to a long array which will be filled with an array of split positions. Each position ideally equals a word boundary within the image.
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
See also:
SPImageGetSplitPositions

HRESULT ACTIVESWLib::ISPImage::Invert [in] long  iFlags,
[out, retval] long *  result
 

Invert the image.

For an overview on image cleaning see sec_Cleaning

Parameters:
iFlags [i] inversion flags, a combination of these values:
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageInvert

HRESULT ACTIVESWLib::ISPImage::MaskImage [in] ISPImage pMask,
[in] long  iLeft,
[in] long  iTop,
[in] long  iRight,
[in] long  iBottom,
[in] long  iFlags,
[out, retval] long *  result
 

Mask this image with the contents of spImage.

Parameters:
pMask [i] a pointer to a valid SPIMAGE_T data structure that contains the mask
iLeft [i] the left coordinate in this image that will be masked
iTop [i] the top coordinate in this image that will be masked
iRight [i] the right coordinate in this image that will be masked
iBottom [i] the bottom coordinate in this image that will be masked
iFlags [i] a set of flags to specify the mask operation, supported operations:
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
pMask MUST be smaller or equal to this image, width and height of pRect must equal width and height of pMask!
See also:
SPImageMaskImage

HRESULT ACTIVESWLib::ISPImage::Mirror [in] long  iAxes,
[out, retval] long *  result
 

Mirror the image.

Parameters:
iAxes [i] mirror axes: 1 horizontal, 2 vertical, 3 horizontal and vertical
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageMirror

HRESULT ACTIVESWLib::ISPImage::Region [in] long  iLeft,
[in] long  iTop,
[in] long  iRight,
[in] long  iBottom,
[out, retval] long *  result
 

Cut the image to a region.

Parameters:
iLeft [i] left edge of the resulting image
iTop [i] top edge of the resulting image
iRight [i] right edge of the resulting image
iBottom [i] bottom edge of the resulting image
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageRegion

HResult ACTIVESWLib::ISPImage::Resize [in] long  iResolution,
[in] long  iAlgo,
[out, retval] long *  result
 

Resize the image.

Parameters:
iResolution [i] new resolution of the image
iAlgo [i] currently not used, must be 0
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
The image will be resized to match the new resolution iRes [dots per inch], iRes must be smaller than the current resolution of the image Algorithm 0 is optimized to resize signatures for comparing the signature image statically, see SPCompareStaticImage and SPX_COMPARE_AUTOZOOM.
See also:
SPImageResize

HRESULT ACTIVESWLib::ISPImage::Rotate [in] long  iAngle,
[out, retval] long *  result
 

Rotate the image.

Since:
Version 3.0 rotates any angle.
Parameters:
iAngle [i] rotation angle in degrees
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageRotate

HRESULT ACTIVESWLib::ISPImage::SetBitmap [in] ISPFlatFile pBitmap,
[in] long  iPage,
[out, retval] long *  result
 

Copy the picture contained in pBitmap into the image object.

Parameters:
pBitmap [i] pointer to a memory region that contains a static picture in a standard format such as win / OS/2 Bitmap, TIFF etc.
iPage [i] 0-based page number
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetBitmap

HRESULT ACTIVESWLib::ISPImage::SetBitsPerPixel [in] long  iBitsPerPixel,
[out, retval] long *  result
 

Set the number of bits per pixel (color resolution) of this image object [in dpi].

Parameters:
iBitsPerPixel [i] the number of bits per pixel of the contained image, valid values are 1, 8 and 24
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetBitsPerPixel, GetBitsPerPixel

HRESULT ACTIVESWLib::ISPImage::SetBitsPerPixel2 [in] long  iBitsPerPixel,
[in] SAFEARRAY(LONG)*  iColorPalette,
[out, retval] long *  result
 

Set the number of bits per pixel (color resolution) of this image object [in dpi].

Parameters:
iBitsPerPixel [i] the number of bits per pixel of the contained image, valid values are 1, 8 and 24
iColorPalette [i] an array of 256 colors (in the format 0xrrggbb) that will be used to set the color for each pixel, when converting a BW or gray image to a color image.
ignored when creating a gray or BW image.
may be NULL
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetBitsPerPixel, GetBitsPerPixel

HRESULT ACTIVESWLib::ISPImage::SetDefaultBinarizeParams [in] long  lMethod,
[in] long  lThreshold,
[out, retval] long *  result
 

Set the default binarization threshold, see sec_Cleaning.

Parameters:
lMethod [i] the new default method
lThreshold [i] the new default threshold
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageGetDefaultBinarizeParams, SPImageBinarize
Note:
The default threshold is used to temporarily convert gray to BW images. It affects these functions:

HRESULT ACTIVESWLib::ISPImage::SetEmpty [in] long  iWidth,
[in] long  iHeight,
[in] long  iColor,
[in] long  iResolution,
[out, retval] long *  result
 

Set an empty image.

Parameters:
iWidth [i] Width of the image
iHeight [i] height of the image
iColor [i] Color of the image (gray level in range 0 .. 255, see below)
iResolution [i] the resolution of the resulting image [DPI]
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
SetEmpty create a gray image with 8 bit per pixel
See also:
SPImageSetEmpty, SetEmpty2

HRESULT ACTIVESWLib::ISPImage::SetEmpty2 [in] long  iWidth,
[in] long  iHeight,
[in] long  iColor,
[in] long  iResolution,
[in] long  iBitsPerPixel,
[out, retval] long *  result
 

Set an empty image.

Parameters:
iWidth [i] Width of the image
iHeight [i] height of the image
iColor [i] Color of the image (gray level in range 0 .. 255, see below)
iResolution [i] the resolution of the resulting image [DPI]
iBitsPerPixel [i] the bit depth, range 1 (black white), 8 (gray-scale) or 24 (color)
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
Returns:
automation result
Note:
SPImage supports black-white images with 1 bit per pixel, gray scale images with 8 bit per pixel and color images with 24 bit pet pixel
See also:
SPImageSetEmpty2, SetBitsPerPixel

HRESULT ACTIVESWLib::ISPImage::SetPixel [in] long  iX,
[in] long  iY,
[in] long  iGray,
[out, retval] long *  result
 

Set a pixel at location iX, iY.

Parameters:
iX [i] x-coordinate, 0-based
iY [i] y-coordinate, 0-based
iGray [i] gray level, range 0 ... 255
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
Note:
The XML string is described in sec_XML_Data

the coordinate origin must be Image

See also:
SPImageDrawObject

HRESULT ACTIVESWLib::ISPImage::SetReference [in] ISPReference pReference,
[in] long  iIndex,
[out, retval] long *  result
 

Copy the picture contained in a reference at index into the image object.

Parameters:
pReference [i] pointer to a valid reference object
iIndex [i] 0-based index into the reference
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetReference

HRESULT ACTIVESWLib::ISPImage::SetReference2 [in] ISPReference pReference,
[in] long  iIndex,
[in] ISPTicket pTicket,
[out, retval] long *  result
 

Copy the picture contained in a reference at index into the image object.

Parameters:
pReference [i] pointer to a valid reference object
iIndex [i] 0-based index into the reference
pTicket [i] pointer to a (SP_TICKET_RENDER) charged ticket object, or 0 if not applicable
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetReference2, SetReference
Deprecated:
Use ACTIVESWLib::ISPSignware::SetTicket and then call ACTIVESWLib::ISPImage::SetReference

HRESULT ACTIVESWLib::ISPImage::SetResolution [in] long  iRes,
[out, retval] long *  result
 

Overwrite the resolution of a picture in a SPIMAGE_T object.

SetResolution overrules the resolution tag of the contained image, use Resize() to change the resolution and to calculate the contents based on the new resolution

Parameters:
iRes [i] Resolution of the picture
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
GetResolution, Resize

HRESULT ACTIVESWLib::ISPImage::SetSignature [in] ISPSignature pSignature,
[out, retval] long *  result
 

Copy the picture contained in a signature into the image object.

Parameters:
pSignature [i] pointer to a valid signature object
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetSignature

HRESULT ACTIVESWLib::ISPImage::SetSignature2 [in] ISPSignature pSignature,
[in] ISPTicket pTicket,
[out, retval] long *  result
 

Copy the picture contained in a signature into the image object.

Parameters:
pSignature [i] pointer to a valid signature object
pTicket [i] pointer to a (SP_TICKET_RENDER) charged ticket object, or 0 if not applicable
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetSignature2, SetSignature
Deprecated:
Use ACTIVESWLib::ISPSignware::SetTicket and then call ACTIVESWLib::ISPImage::SetSignature

HRESULT ACTIVESWLib::ISPImage::SetTellerImage [in] ISPTellerImage pTellerImage,
[out, retval] long *  result
 

Copy the picture contained in a teller image into the image object.

Parameters:
pTellerImage [i] valid teller image object
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetTellerImage

HRESULT ACTIVESWLib::ISPImage::SetTemplate [in] ISPTemplate pTemplate,
[out, retval] long *  result
 

Copy the picture contained in a template into the image object.

Parameters:
pTemplate [i] pointer to a valid template object
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetTemplate

HRESULT ACTIVESWLib::ISPImage::SetTemplate2 [in] ISPTemplate pTemplate,
[in] ISPTicket pTicket,
[out, retval] long *  result
 

Copy the picture contained in a template into the image object.

Parameters:
pTemplate [i] pointer to a valid template object
pTicket [i] pointer to a (SP_TICKET_RENDER) charged ticket object, or 0 if not applicable
result [o] pointer to an long that will be filled with the SDK result, if the functions returns S_OK
errors:
Returns:
automation result
See also:
SPImageSetTemplate2, SetTemplate
Deprecated:
Use ACTIVESWLib::ISPSignware::SetTicket and then call ACTIVESWLib::ISPImage::SetTemplate


The documentation for this interface was generated from the following file: