ClearImage COM API
Trim Method
CiTools Object : Trim Method
Number of pixels to trim from each direction
Description
Trim image
Syntax
Visual Basic
Public Sub Trim( _
   ByVal Pixels As Long, _
   ByVal Direction As EMorphDirections _
) 
Parameters
Pixels
Number of pixels to trim from each direction
Direction
ValueDescription
ciMorphAllNeighboursModify all neighboring pixels
ciMorphDiagModify pixels located diagonally
ciMorphHorzModify pixels located to the left and right
ciMorphHorzAndVertModify pixels located left, right, up or down
ciMorphVertModify pixels located up and down
Remarks
Method requires bi-tonal image (object.Image.BitsPerPixel = 1).
Example
Morphological Functions
Sub MorphologicalOps(imageFile As String, imageFileOut As String)
      ' Open image file
    Dim ci As New CiServer
    Dim Tools As CiTools: Set Tools = ci.CreateTools
    Tools.Image.Open imageFile
      ' Do processing
    Tools.Fatten 2, ciMorphAllNeighbours
    Tools.Trim 4, ciMorphVert
      ' Save results
    Tools.Image.SaveAs imageFileOut, ciEXT
End Sub
See Also

CiTools Object  | CiTools Members