How do I join two images together?
I want to join two image files in Ubuntu 12.04. Is there any way I can accomplish this?
Is there any utility for joining image files, perhaps something like MS-Paint in Ubuntu?
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:
- File > New ; create image bigger than both of your images to join combined.
- File > Open as Layers ; open your images.
- Use the Move [M] tool to arrange your images.
- Use the Crop [Shift+C] tool to crop everything when finished rearranging.
- 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).
For anyone that doesn't have the luxury of installing software(ex. on a work computer)...
If it hasn't been removed, libreoffice Draw can also do this if your preference is manual manipulation...(with me guessing what "join" truly means)
You open both instances
cut one image
paste it to the other (or both into new file)
arrange them to preference (postiton/crop/etc)
select the entire new image
right click and convert it to a bitmap or metafile
right-click and save
choose your format