// Opens an image and merges it into an already open image.
using (FileStream file = new FileStream("photo.jpg",
                   FileMode.Open, FileAccess.Read, FileShare.Read))
{
    ImGearRasterPage igRasterPageToMerge = (ImGearRasterPage)
        ImGearFileFormats.LoadPage(file, 0);
    // Subtract the opened image from the existing image.
    ImGearRasterProcessing.Merge(igRasterPage, igRasterPageToMerge, 0, 0, ImGearMergeModes.SUB);
}
	 
	
		' Opens an image and merges it into an already open image.
Using file As New FileStream("photo.jpg", FileMode.Open, FileAccess.Read, FileShare.Read)
    Dim igRasterPageToMerge As ImGearRasterPage = DirectCast(ImGearFileFormats.LoadPage(file, 0), ImGearRasterPage)
    ' Subtract the opened image from the existing image.
    ImGearRasterProcessing.Merge(igRasterPage, igRasterPageToMerge, 0, 0, ImGearMergeModes.[SUB])
End Using