
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. If you have extra questions about this answer, please click "Comment". If the answer is the right solution, please click "Accept Answer" and kindly upvote it. In order to test the result, I used the same picture and set the picture background color is black. G.DrawImage(image2, image1.Width+space, 0) For each of the three images: a) Click on grayscale image window.

My idea is that we could add the width when we merge the second image.Ĭode: private Bitmap MergeImages(Image image1, Image image2,int space)īitmap bitmap = new Bitmap(image1.Width + image2.Width+space, Math.Max(image1.Height, image2.Height)) Image > Color > Merge Channels (green and red channel) select Keep Sources. The left image original is like this without the white area at the bottom and this is how I want it to be when merging both images :ĭotnet-csharp I make some changes on your code and it could add space between two images.
#IMAGEJ COMBINE IMAGES HOW TO#
The second problem is how to add a variable for the space between the images ? space I mean not white area between them but just a space between themĪ variable for example if I set the variable value to 0 the merged image will be as it is now in the screenshot without space but if I set the value to 10 for example then there will be a space of 10 units(not sure what units) space.īecause is hard to see the white area at the bottom of the left image I took a screenshot of my screen to show it more clear : The problem is on the left image there is a bit white area and in the original image it's not exist so how can I make that the white area will not be exist ? Image.FromFile(filesSatellite[filesSatellite.Length - Images\merged.bmp") Using it MergeImages(Image.FromFile(filesRadar),


Using (Graphics g = Graphics.FromImage(bitmap)) private Bitmap MergeImages(Image image1, Image image2)īitmap bitmap = new Bitmap(image1.Width + image2.Width, Math.Max(image1.Height, image2.Height)) This method merge the two images side by side but not yet perfect as I wanted.
