AccusoftImagXpress13 ActiveX DLL > ImagXpress Object : AutoCrop Method |
The percent of pixels that indicate that the inner edge of the border has been reached.
It has a minimum value of 0.0 and a maximum value of 1.0.
The IPcropPct parameter can be adjusted to compensate for noise that is typically found in scanned documents.
The left and right border size in pixels for the cropped image.
Range: 0 to max image size
The top and bottom border size in pixels for the cropped image.
Range: 0 to max image size
The percent of pixels that indicate that the inner edge of the border has been reached.
It has a minimum value of 0.0 and a maximum value of 1.0.
The IPcropPct parameter can be adjusted to compensate for noise that is typically found in scanned documents.
The left and right border size in pixels for the cropped image.
Range: 0 to max image size
The top and bottom border size in pixels for the cropped image.
Range: 0 to max image size
This method works best with 1-bit images.
ImagXpress will examine the image to determine if the background color is black or white. For a document with a white background, beginning with the top row, each row is examined for black pixels. If the percentage of black pixels in that row is less than IPcropPct, the row is eliminated and the next row is examined. The process continues until the number of black pixels exceeds IPcropPct or until the entire image has been processed.
The same process is applied for rows from bottom to top and from the left most column to right and from the right most column to the left.
In this example AutoCrop was called to remove the whitespace around the text. This image had very little noise in the borders so a low IPCropPct was used. A four pixel border was chosen in all directions.
ImagXpress1.AutoCrop 0.01, 4, 4 |