InvertedText method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax:

int InvertedText(unsigned uProcessFlags, int nMinInvertWidth, int nMinInvertHeight, int nMinBlackPercent, int nMaxBlackPercent);

Delphi Syntax:

Function InvertedText(uProcessFlags: L_UINT32; nMinInvertWidth: L_INT32; nMinInvertHeight: L_INT32; nMinBlackPercent: L_INT32; nMaxBlackPercent: L_INT32): L_INT;

Overview

Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)Finds and inverts areas of inverted text in a 1-bit black and white image.

Inverted text is commonly found in scanned text documents.

Below is an example of inverted text often found in scanned images:

image\Invert1.gif

Inverting the area of inverted text yields:

image\Invert2.gif

This method works only on 1-bit black and white images.

If a region is selected, only the selected region will be changed by this method. If no region is selected, the whole image will be processed.

The behavior of this method can be modified by using the OnInvertedText event.

This method triggers both the OnInvertedText event and the OnStatus event.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

OnInvertedText event

Topics:

Raster Images: Cleaning - up 1-Bit Images