Accusoft ImagXpress 13
CropBorder Method
Single that evaluates to the crop percent as described in Remarks. Valid range is between 0.0 and 1.0 (percent).

A CropBorder type value used in determining the type of crop to perform.

Value Description
0 Crop border background color.
1 Crop border foreground color.
2 Crop border black color.
3 Crop border white color.

Description
Performs border removal by automatically cropping the edges of the current image.
Syntax
Visual Basic
Public Sub CropBorder( _
   ByVal IPCropPct As Single, _
   ByVal IPCropBorder As Integer _
) 
Parameters
IPCropPct
Single that evaluates to the crop percent as described in Remarks. Valid range is between 0.0 and 1.0 (percent).
IPCropBorder

A CropBorder type value used in determining the type of crop to perform.

Value Description
0 Crop border background color.
1 Crop border foreground color.
2 Crop border black color.
3 Crop border white color.

Remarks

Occasionally, scanned documents possess edges where the selected scan area falls outside of the scanned page. Use CropBorder method to remove these edges from images.

Use DocumentBorderCrop to remove unwanted edges from documents.

Beginning with the top row, each row is examined for pixels containing the border color. If the percentage pixels containing the border color in that row and its adjacent row is greater than IPCropPct, the row is eliminated and the next row is examined. The process continues until the number of pixels containing the border color is less than CropPct.

The same process is applied for rows from bottom to top and from the leftmost column to right and from the rightmost column to the left. The IPCropPct argument can be adjusted to compensate for noise that is typically found in scanned documents.

Example
ImagXpress1.CropBorder0.9,2'Removebordersthatare90%ormoreblack.
See Also

ImagXpress Object  | ImagXpress Members  | DocumentBorderCrop Method  | Cropping

 

 


©2018. Accusoft Corporation. All Rights Reserved.

Send Feedback