'Declaration
Public Function AutoTextInvert( _ ByVal ImageID As Integer, _ ByVal MinObjectWidth As Integer, _ ByVal MinObjectHeight As Integer, _ ByVal MinBlackPercent As Integer, _ ByVal MaxBlackPercent As Integer, _ ByVal FixBackground As Boolean, _ ByVal ConnectedToLines As Boolean, _ ByVal MaxLinesThickness As Integer _ ) As GdPictureStatus
public GdPictureStatus AutoTextInvert( int ImageID, int MinObjectWidth, int MinObjectHeight, int MinBlackPercent, int MaxBlackPercent, bool FixBackground, bool ConnectedToLines, int MaxLinesThickness )
public function AutoTextInvert( ImageID: Integer; MinObjectWidth: Integer; MinObjectHeight: Integer; MinBlackPercent: Integer; MaxBlackPercent: Integer; FixBackground: Boolean; ConnectedToLines: Boolean; MaxLinesThickness: Integer ): GdPictureStatus;
public function AutoTextInvert( ImageID : int, MinObjectWidth : int, MinObjectHeight : int, MinBlackPercent : int, MaxBlackPercent : int, FixBackground : boolean, ConnectedToLines : boolean, MaxLinesThickness : int ) : GdPictureStatus;
public: GdPictureStatus AutoTextInvert( int ImageID, int MinObjectWidth, int MinObjectHeight, int MinBlackPercent, int MaxBlackPercent, bool FixBackground, bool ConnectedToLines, int MaxLinesThickness )
public: GdPictureStatus AutoTextInvert( int ImageID, int MinObjectWidth, int MinObjectHeight, int MinBlackPercent, int MaxBlackPercent, bool FixBackground, bool ConnectedToLines, int MaxLinesThickness )
Parameters
- ImageID
- GdPicture image identifier. Only 1 bit per pixel images with black and white palette are supported.
- MinObjectWidth
- Minimum width of the black background object.
- MinObjectHeight
- Minimum height of the black background object.
- MinBlackPercent
- Minimum percent of black pixels within the background object. Can be thought of as how much black space there needs to be where there is no white text.
- MaxBlackPercent
- Maximum percent of black pixels within the background object. Can be thought of as how much white text there needs to be in the black object.
- FixBackground
- Whether or not to despeckle the background after inverting it. Black objects are usually imperfectly scanned in low DPIs, resulting in holes which would appear as noise once inverted. Setting this to True would clean up this noise, but would also eliminate some characters if they are too small.
- ConnectedToLines
- Whether or not the object is connected to lines as part of a table for example.
- MaxLinesThickness
- If ConnectedToLines is True, then you would need to specify the max thickness of those lines. A value between 1-5 is suggested.
Return Value
A member of the GdPictureStatus enumeration.