ImageGear Professional for Windows ActiveX
CleanBorders Method

Description:

Detects and removes the large black regions near the borders of a 1-bit image. These black borders can appear as a result of scanning an image that was reproduced with a copier onto paper that was larger than the image itself.

This method works in two modes. In the first (default) mode the CleanBorders operation is performed using the general ImageClean algorithm. No extra parameters are available for this mode. In the second mode the CleanBorders operation is performed using IGICCtl. CleanBordersOptions2 Property values. The first 4 values specify the maximal size for all borders. It means the pixels from the outside of the borders will not be deleted. But it doesn't mean that all pixels inside the borders will be deleted. The last two values specify the groups of pixels (blocks) inside the borders that should be deleted. The blocks with MinLinesNum or more number of lines and width equal to MinLineWidth or wider will be deleted from the image. For the left and right borders the block lines are actually parts of screen lines and for the top and bottom borders those lines are screen columns.

To switch the method to the second mode set IGICCtl.Method Property to IG_IC_METHOD_2.

This method can be applied several times. First time large values can be set for all parameters and thus large borders will be removed without removing actual image parts. Then setting small values for the parameters will cause removing of small spots near the edges of the image.

Syntax:

CleanBorders (ByVal pPage As IGPage)

Parameters:

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

Return Value:

N/A

Bits Per Pixel:

1

Sample:

Ip_Fx

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback