Accusoft.ImagXpressSdk Namespace > Processor Class : AutoCrop Method |
A float value which represents the percentage of pixels that indicate that the inner edge of the border has been reached.
Valid values are 0.0 to 1.0
This value may be adjusted to compensate for noise that is typically found in scanned documents. Typically this value will be less than 0.1. For cleaner images this value should be even lower. In this instance, some value around or below 0.02 would be a good choice. For a computer generated image with no noise, 0.0 may be used. A value of 1.0 would never allow any cropping to occur.
'Declaration Public Sub AutoCrop( _ ByVal percentCrop As Single, _ ByVal border As Point _ )
'Usage Dim instance As Processor Dim percentCrop As Single Dim border As Point instance.AutoCrop(percentCrop, border)
public void AutoCrop( float percentCrop, Point border )
public: void AutoCrop( float percentCrop, Point border )
public: void AutoCrop( float percentCrop, Point border )
A float value which represents the percentage of pixels that indicate that the inner edge of the border has been reached.
Valid values are 0.0 to 1.0
This value may be adjusted to compensate for noise that is typically found in scanned documents. Typically this value will be less than 0.1. For cleaner images this value should be even lower. In this instance, some value around or below 0.02 would be a good choice. For a computer generated image with no noise, 0.0 may be used. A value of 1.0 would never allow any cropping to occur.
ImagXpress will examine the image to determine if the background color is black or white. ImagXpress will then determine whether it should automatically crop the foreground or background color. As an example consider a document with a white background that ImagXpress has determined the need for the white background color to be cropped. Beginning with the top row, each row is examined for black pixels. If the percentage of black pixels in that row is less than the given percentCrop, the row is eliminated and the next row is examined. The process continues until the number of black pixels exceeds the percentCrop, or until the border is reached. 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.