Merging two pictures

Using the tools provided with ImageMagick

Install via the software center

We can easily join, i.e. "montage" images into one large image with the following command

montage -geometry 500 image1 image2 [...] output

See the project page for many parameters of the geometry option. In the example above all images will be scaled to a width of 500 pixels before they are joined. Adapt this value for your image sizes. In case you need to have a fixed height choose x500 instead. The other dimension will be scaled to preserve the aspect ratio.


Inspired by this post saying that ImageMagick has command line tool named convert to merge images. To join images horizontally (in alphabetical order):

convert +append *.png out.png 

To stack images vertically:

convert -append *.png out.png

That should be run in a terminal into the folder containing png files to join them all.

A gui for that would be:

a file manager context menu to join selected images.

An easy way when it comes to that is Thunar's custom actions:

To join selected images vertically (into one png file, in alphabetical order, no matter their extension) add this custom action:

convert -append %F joined-vertical.png

To join horizontally:

convert +append %F joined-horizontal.png

For a more sophisticated way to assemble images you may want to search for panorama photo stitcher software such as hugin Install hugin

Install via the software center

or the Pandora plugin for Gimp.


You can easily achieve that with Gimp.

1)Make a new file File->New

At the "create new image" dialog add the desired height and width.That will give you your new file which may look like this (depending on the dimensions you set) :

2)Open the two images you want to merge from File -> Open...

3)Then click copy at the image Edit -> Copy...

4)Go to the empty file you created first at step 1 and paste the images (Copy and paste the first image and then copy and paste the second) Edit -> Paste

5)Position the two images using the "Move" option from the Toolbox

When the pasted image is where you want it, set it in place. Either move your cursor on the canvas until you see a little anchor symbol, or click "Layer" on the Toolbar, then select "Anchor":

6)Scale the new file with the two merged pictures Image -> Scale Image...


I finally settled for Hugin. It requires some manual intervention, but has produced a really good result.

Here is a tutorial that explains how to use Hugin so that it will not try to deform your flat images (the tool was born to produce panorama images from single pictures, hence it usually compensates for the perspective effects).