ClearImage COM API
MeasureMargins Method
CiTools Object : MeasureMargins Method
Description
Measure image margins
Syntax
Visual Basic
Public Function MeasureMargins() As CiRect
Return Type

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

Example
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

CiTools Object  | CiTools Members