Extract an object into a new image
Sub ExtractObjects(imageFile As String) ' Open image file Dim ci As New CiServer Dim Tools As CiTools: Set Tools = ci.CreateTools Tools.Image.Open imageFile ' Do processing Dim Obj As CiObject Dim imageObject As CiImage ' Image of extracted object Set Obj = Tools.FirstObject Do While Not Obj Is Nothing Set imageObject = Tools.ExtractObject(Obj) ' Do something with imageObject For Example: ' imageObject.Append outFile Set Obj = Tools.NextObject Loop End Sub