ClearImage COM Server
MeasureMargins Method
See Also  Example  Send Feedback
CiTools Object : MeasureMargins Method

Description

Measure image margins

Syntax

Visual Basic
Public Function MeasureMargins() As CiRect

Return Type

Returned CiRect object represents a rectangle on the image within which all image or ROI black pixels are located.  If image or ROI contains no pixels, 0 or Nothing is returned.

Example

VB Example (Visual Basic)Copy Code
Public Sub T_MeasureMargins(ByRef Tools As CiTools)
  Dim Rect As CiRect
  Set Rect = Tools.MeasureMargins
  If (Rect Is Nothing) Then
     Debug.Print "  Margins:  N/A"
  Else
     Debug.Print "  Margins:  l=" & Rect.left & "  t=" & Rect.top & _
        "  r=" & Tools.Image.Width - Rect.right & "  b=" & Tools.Image.Height - Rect.bottom
  End If
End Sub

See Also

© 1992-2011. Inlite Research, Inc. All Rights Reserved.