ImageGear Professional for Windows ActiveX
InvertWhiteText Method

Description:

Detects the areas of white text on black backgrounds in 1-bit image and inverts them to the black text on white backgrounds. This method scans your entire image and makes adjustments to all areas of white text on black that fall within the scope of the defined settings.

The InvertWhiteText operation is performed using IGICCtl.InvertWhiteTextOptions Property values.

The MinX Property and MinY Property values tell ImageGear the minimum width and height (respectively) for areas that you would like to invert. For example, if you set IGICCtl.InvertWhiteTextOptions Property.MinX Property = 60 and IGICCtl.InvertWhiteTextOptions Property.MinY Property = 20, ImageGear will only invert sections of white text on black background with a minimum width of 60 pixels and a minimum height of 20 pixels.

The MinT value specifies the minimum "thickness" of spaces that fall between sections of text that will be inverted. This minimum value indicates those sections of text to be treated as one section based on how close they are to one another. As an example, let's say you have three adjacent sections of white text on black backgrounds that contain the words, "There," "is," and "hope." If "There" and "hope" meet your minimum size requirements they will be inverted. If "is" is below your minimum size requirements and you have not set IGICCtl.InvertWhiteTextOptions Property.MinT Property to a small enough value, "is" will not be inverted, resulting in "There" and "hope" looking normal, while "is" remains white text on black background. To prevent this (if desired), you would need to set IGICCtl.InvertWhiteTextOptions Property.MinT Property to the value small enough to include the spaces before and after the word "is." This way, all the words would be treated as one section and inverted together.

The MinSymbol Property and MaxSymbol Property values determine the minimum and maximum sizes of the white letters to be inverted, i.e. the maximum width and height of the letter cell that is the smallest rectangle that completely covers the letter.

The MaxBorder Property value sets the maximum border size around the letter that will be inverted along with the letter cell. For example, if width and height of the letter cell are 20 and 30 respectively and IGICCtl.InvertWhiteTextOptions.MaxBorder Property = 10, then the width and the height of the rectangle that will be inverted are 40 (10+20+10) and 50 (10+30+10) respectively. Please be careful when setting this parameter. If it is very large, it is possible that incorrect image areas will be inverted.

Syntax:

      InvertWhiteText (ByVal pPage As IGPage)

Parameters:

Name Description
pPage Reference to IGPage Object for which the InvertWhiteText operation happens.

Return Value:

N/A

Bits Per Pixel:

1

Sample:

Ip_Fx

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback