The example uses the Layer method to combine two images into a single composite image.

Example Code

Paste using ImageKit3 so that the upper left corner of the ImageKit2 image is in the center position above the ImageKit1 image.

If the overall size of the pasted image is larger than the image in ImageKit1, the resulting image will be enlarged to contain both images. The areas not containing any image will be set the to background color. (In this case, to blue)

* It is also possible to clip the area extending beyond the size of the image in ImageKit1. The transparency level (opacity) of the pasted image can also be set.

[Visual Basic.NET]

'(Images are already loaded in the ImageKit1 and 2 controls)
'Paste execution (write the following in the button click event etc.)
ImageKit3.Effect.Layer(ImageKit1.Image, ImageKit2.Image, 0, False, 0, 0, 0, 0, 0, 255, ImageKit1.Image.Width / 2, ImageKit1.Image.Height / 2, False, False)

'* As shown below, the image to be combined can be created even if it is not loaded in the ImageKit control.
'Dim img As Image = Image.FromFile("e:\images\001.jpg")
'ImageKit3.Effect.Layer(img, PictureBox1.Image, ・・・)
'* Also, as shown below, either image can be the image of the ImageKit control itself that executes pasting.
'ImageKit3.Effect.Layer(ImageKit3.Image, ImageKit2.Image, ・・・)

'Display the result in scale mode
ImageKit3.DisplayMode = Newtone.ImageKit.Win.DisplayMode.Scale
ImageKit3.Display()

[Visual C#.NET]

//(Images are already loaded in the ImageKit1 and 2 controls)
//Paste execution (write the following in the button click event etc.)
ImageKit3.Effect.Layer(ImageKit1.Image, ImageKit2.Image, 0, false, 0, 0, 0, 0, 0, 255, Convert.ToInt32(ImageKit1.Image.Width / 2.0), Convert.ToInt32(ImageKit1.Image.Height / 2.0), false, false);

//* As shown below, the image to be combined can be created even if it is not loaded in the ImageKit control.
//Image img = Image.FromFile(@"e:\images\001.jpg");
//ImageKit3.Effect.Layer(img, PictureBox1.Image, ・・・);
//* Also, as shown below, either image can be the image of the ImageKit control itself that executes pasting.
//ImageKit3.Effect.Layer(ImageKit3.Image, ImageKit2.Image, ・・・);

//Display the result in scale mode
ImageKit3.DisplayMode = Newtone.ImageKit.Win.DisplayMode.Scale;
ImageKit3.Display();

Relevant Methods

ImageKit.Effect.Layer

The ImageKit.NET3 is created by Newtone Corporation