Accusoft ImagXpress 12
DocumentErode Method
See Also  Send comments on this topic.
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

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

AccusoftImagXpress12 ActiveX DLL > ImagXpress Object : DocumentErode Method

Glossary Item Box

Description

Removes the black pixels in the current image by the given amount in the given direction.

Syntax

Visual Basic
Public Sub DocumentErode( _
   ByVal Amount As Integer, _
   ByVal Direction As enumEnhancementDirection _
) 

Parameters

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
ValueDescription
EnhancementDirectionAllEnhance all directions.
EnhancementDirectionDownEnhance down.
EnhancementDirectionLeftEnhance left.
EnhancementDirectionLeftDownEnhance left and down.
EnhancementDirectionLeftDownBothEnhance left, down, and diagonally left down.
EnhancementDirectionLeftUpEnhance left and up.
EnhancementDirectionLeftUpBothEnhance left, up, and diagonally left up.
EnhancementDirectionRightEnhance right.
EnhancementDirectionRightDownEnhance right and down.
EnhancementDirectionRightDownBothEnhance right, down, and diagonally right down.
EnhancementDirectionRightUpEnhance right and up.
EnhancementDirectionRightUpBothEnhance right, up, and diagonally right up.
EnhancementDirectionUpEnhance 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

Remarks

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.

See Also

©2013. Accusoft Corporation. All Rights Reserved.