InvertWhiteText(ImGearPage,Int32,Int32,Int32) Method
In This Topic
Detects areas of white text on black backgrounds and inverts them so that they become black text on white backgrounds.
Syntax
'Declaration
Public Overloads Shared Sub InvertWhiteText( _
ByVal As ImGearPage, _
ByVal As Integer, _
ByVal As Integer, _
ByVal As Integer _
)
'Usage
Dim page As ImGearPage
Dim minWidth As Integer
Dim minHeight As Integer
Dim minThickness As Integer
ImGearIC.InvertWhiteText(page, minWidth, minHeight, minThickness)
public static void InvertWhiteText(
ImGearPage ,
int ,
int ,
int
)
public: static void InvertWhiteText(
ImGearPage* ,
int ,
int ,
int
)
public:
static void InvertWhiteText(
ImGearPage^ ,
int ,
int ,
int
)
Parameters
- page
- 1-bit ImGearPage object to apply the method to.
- minWidth
- Specifies the minimum width for areas that you would like to invert.
- minHeight
- Specifies the minimum height for areas that you would like to invert. For
example, if you set minX = 60 and minY = 20, ImageGear will only invert sections of white text on
black background that have a minimum width of 60 pixels and a minimum height of 20 pixels.
- minThickness
- 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 minT, "is" will note 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 minT to a 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.
Example
See Also