AccusoftImagXpress13 ActiveX DLL > ImagXpress Object : CropBorder Method |
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. |
Visual Basic |
---|
Public Sub CropBorder( _ ByVal IPCropPct As Single, _ ByVal IPCropBorder As Integer _ ) |
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. |
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.
ImagXpress1.CropBorder0.9,2'Removebordersthatare90%ormoreblack.