How do I join two images together?

A s a complement to the other answer on imagemagick and considering the need for a GUI.

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 ('Edit - Configure custom actions'):

convert -append %F joined-vertical.png

To join horizontally:

convert +append %F joined-horizontal.png

The same commands can be used in a .desktop file in /.local/share/file-manager/actions which adds a context menu for Nautilus and/or PCManFM.

Example for vertical join:

[Desktop Entry]
Type=Action
Name=Join images (vertically)
Profiles=profile-zero;
TargetLocation=true
Icon=gthumb

[X-Action-Profile profile-zero]
Basenames=image/*;*;
Exec=convert -append %F joined-image.png
Name[en_US]=Default profile
Name[en]=Default profile
Name[C]=Default profile

"join two images" is a quite vague description, but I'm sure you can do what you want with Gimp. You can install it using Software Center or from the command line using

sudo apt-get install gimp

It is probably closer in functionality of Photoshop than to MSPaint though... which is a good thing.

Here's how to do it in GIMP:

  1. File > New ; create image bigger than both of your images to join combined.
  2. File > Open as Layers ; open your images.
  3. Use the Move [M] tool to arrange your images.
  4. Use the Crop [Shift+C] tool to crop everything when finished rearranging.
  5. File > Export to... to save your output file.

That's it! Instead of GIMP you can use Pinta


You can use imagemagick to do this. (I am using it as well.)

First install it: sudo apt-get install imagemagick

After that look here for usage, you will find a lot of examples. The best is that you can use it from command line (integrate within a script for example).