ClearImage COM API
PasteImage Method
CiTools Object : PasteImage Method
Source image
Target position on object.Image.   The default value is 0
Target position on object.Image.   The default value is 0
Description
Paste another image onto the image
Syntax
Visual Basic
Public Sub PasteImage( _
   ByVal ImgSrc As CiImage, _
   Optional ByVal left As Long = 0, _
   Optional ByVal top As Long = 0 _
) 
Parameters
ImgSrc
Source image
left
Target position on object.Image.   The default value is 0
top
Target position on object.Image.   The default value is 0
Remarks

This method sets object.Image pixels to a result of the logical operation between themselves and corresponding pixels of ImgSrc located at left and top offsets.

BitsPerPixel property of object.Image and ImgSrc should be the same.

This method generates an error if object.Image.IsZone is true.

Example
Sub LogicalMethods(imageFile1 As String, imageFile2 As String, imageFileOut As String)
    ' Create objects and open input images
  Dim Ci As New CiServer
  Dim Tools As CiTools: Set Tools = Ci.CreateTools
  Tools.Image.Open imageFile1
  Dim Image As CiImage: Set Image = Ci.CreateImage
  Image.Open imageFile2
    ' Do processing
  Dim x, y: x = 20: y = 20
  Tools.AndImage Image, x, y
  x = x + Tools.Image.Width / 5 + 20
  y = y + Tools.Image.Height / 5 + 20
  Tools.OrImage Image, x, y
  
  x = x + Tools.Image.Width / 5 + 20
  y = y + Tools.Image.Height / 5 + 20
  Tools.XorImage Image, x, y
  
  x = x + Tools.Image.Width / 5 + 20
  y = y + Tools.Image.Height / 5 + 20
  Tools.PasteImage Image, x, y
    ' Save results
  Tools.Image.SaveAs imageFileOut, ciEXT
End Sub
See Also

CiTools Object  | CiTools Members  | OrImage  | XorImage  | AndImage  | PasteImage