How to stitch two images side by side?

Is there a way to have two images in the same file?

The name of what I am trying to do is unknown to me. I can’t even come up with a tag for this and after spending the last 3 hours on RawTherapee, GIMP, Darktable, ShowFoto and youtube tutorials that end up being How-To-Reduce-ISO-Noise or How-To-Fix-Those-Ugly-Corners-Because-Your-Lens-Is-Too-Old, I am ready to ask for help.

I have two images of the same place from the exact same spot. “A” & “B”. Picture “A” was taken during the day; picture “B” was taken at night. I want to have the left half of “A” next to the right half of “B”.

Cropping them was my first step, but I can’t find a tool that allows me to have them in the same frame/canvas and place them one next to the other.

Any ideas on how to do this or the name of the tool/button?

Thanks.

This seems to be the same question as How to create a diptych - setting two images side by side? - #10 by afre

https://duckduckgo.com/?q=imagemagick+montage+side+by+side

I think you’re asking how to get the night/day images stacked with a mask?

  1. Open one image in GIMP.
  2. Open second image as a new layer.
  3. Add a layer mask to the top image.
  4. Paint/Gradient the mask to show what you want from below.
  5. ???
  6. Profit!

Here’s a quick video showing what I mean, hopefully it helps:

Also, more on layer masks:

6 Likes

Step 1: load both images into Gimp
Step 2: drag one of the images on top of the other image so that it sits on its own layer
Step 3: add an alpha channel to the top layer (Layer|Transparency|Add alpha channel)
Step 4: select the top layer and make a rectangular selection of either the left half or the right, depending which part of the bottom image you want to show on the other half.
Step 5: press the [Delete] button on your keyboard (or use the menu option Edit|Clear

Done!

1 Like

Made a G’MIC filter. Enjoy!
May add more features or extend it later. If you have any feedback, do share. :wink:


Sorry, the G’MIC filters haven’t been updating properly. I can’t access them myself.

BTW, the preview image in previous example is when the images’ dimensions don’t match and Match size is turned off. Here is a better example (cropped screenshot from GIMP).

image

1 Like

Just another method to do this.

  1. Open image A in Gimp.
  2. Open B in Gimp, use the rectangle select tool to select the right part of B. When done, say Edit - Copy selection.
  3. Go to A and say Paste as new layer, it shows up on the left side of A.
  4. Hit M for move and drag it to the right side of A.
  5. Use arrow keys for pixel-precise placement.
  6. When done, do Image - Flatten image and export file.

Sorry, I misread the question, and didn’t notice the cropping requirement. With ImageMagick (Windows BAT syntax):

magick ^
  toes.png t.png ^
  -crop 2x1@ ^
  -delete 1,2 ^
  +append ^
  twohalves.jpg

twohalves

Pretty much the same principle, thanks.
(I didn’t know the term)

Thank You!. That was exactly what I was trying to do.