Measure image margins
Visual Basic |
---|
Public Function MeasureMargins() As CiRect |
A 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.
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