Accusoft.ImagXpress13.Net
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.

A System.Drawing.Point value which represent the (left/right, top/bottom) size in pixels for the cropped image to maintain for a border.
Automatically crops the border space from an image.
Syntax
'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
) 

Parameters

percentCrop

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.

border
A System.Drawing.Point value which represent the (left/right, top/bottom) size in pixels for the cropped image to maintain for a border.
Remarks

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.

See Also

Reference

Processor Class
Processor Members

 

 


©2014. Accusoft Corporation. All Rights Reserved.

Send Feedback