Visual Basic |
---|
Public Sub DocumentErode( _ ByVal Amount As Integer, _ ByVal Direction As enumEnhancementDirection _ ) |
- Amount
The distance to reduce the black pixels.
Range: 1 - 500
Default: 1
ImagXpress does not throw an exception when the range exceeds the image size. Using a value larger than the image is not "wrong", but it is a little strange. Usually select ranges that are not dependent on other inputs (like the image size).
- Direction
Value Description EnhancementDirectionAll Enhance all directions. EnhancementDirectionDown Enhance down. EnhancementDirectionLeft Enhance left. EnhancementDirectionLeftDown Enhance left and down. EnhancementDirectionLeftDownBoth Enhance left, down, and diagonally left down. EnhancementDirectionLeftUp Enhance left and up. EnhancementDirectionLeftUpBoth Enhance left, up, and diagonally left up. EnhancementDirectionRight Enhance right. EnhancementDirectionRightDown Enhance right and down. EnhancementDirectionRightDownBoth Enhance right, down, and diagonally right down. EnhancementDirectionRightUp Enhance right and up. EnhancementDirectionRightUpBoth Enhance right, up, and diagonally right up. EnhancementDirectionUp Enhance up. Direction to apply the erosion. Removes black pixels in this direction. Typically, this is set to a single direction, a pair of directions, or all directions.
Default: EnhancementDirectionAll
Erosion is the process of removing the specified number of black pixels from the existing black pixels on the specified edge or edges of an image.
Output
- ImagXpress validates the input, examines the pixels, reduces black pixels, and returns results from the detection and correction process. The current image content may be modified. If the operation fails, the current image is unchanged.
- IPImageWasModified is set to true if the image was modified, false if the image was not modified.
Using DocumentErode
1. Load a 1 bit image from a file or stream input.
2. Call DocumentErode.
3. The current image is eroded.
Note: Available in Professional Edition.