Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Say I have two photos (or any images), for example with the following dimensions:

+----------+       +----------+
|          |       |          |
|          |       |          |
|320 x 428 |  and  |320 x 428 | 
|          |       |          |
|          |       |          |
+----------+       +----------+

I want to combine them into a single image, side by side. So the result should be

+----------------------+
|                      |
|                      |
|      640 x 428       |
|                      |
|                      |
+----------------------+         

What's the simplest way to do this on a Mac? Is it possible with some default app like Preview, or would you recommend some 3rd party tool for the job?

share|improve this question
3  
There are now two nice command-line answers, but I think the majority of Mac users would prefer a GUI-oriented solution. Post one (something that's simple but effective) and I'll accept it! –  Jonik Jun 4 '12 at 20:47
add comment

11 Answers

up vote 18 down vote accepted

This solution uses only Preview and may be handy if you can't install software on a machine. It is, however, not elegant.

Say your images are called A and B. Then:

  1. Open A in Preview.
  2. Select All, Copy.
  3. In the Tools menu, select Size and adjust the width to the sum of the width of the two images (in your example, 640 px). Keep the height. This will result in a stretched version of A.
  4. Paste the copy of the original A and move it manually to the left.
  5. In another window, open B.
  6. Select All, Copy.
  7. Paste into A, moving it to the right.
  8. Save as a new image.

Since, of course, Preview does not offer any proper image editing tools and no way to exactly position the two images, the ImageMagick solutions posted here are preferable. (Or why not just install MacPorts' GIMP package while you're at it and enjoy a fully equipped image editor?)

share|improve this answer
8  
I'm not sure it's actually possible to enjoy the GIMP. It's useable, sure, but not enjoyable. –  CajunLuke Jun 4 '12 at 21:38
1  
Thanks! Maybe not elegant as you say, but a passable quick solution. I actually tried this before posting the question, but had some problems around step 3 and gave it up. Got it working with these instructions. –  Jonik Jun 4 '12 at 21:41
add comment

I often have to do this with images of plots of data. I use the command line tools that come in the Imagemagick package; I think I installed it on my system with MacPorts. You could also choose to install with brew (brew install imagemagick).

The actual tool you want to use from Imagemagick is the convert tool. If you have your two 320x428 images, say a.png and b.png, you can do

$> convert +append a.png b.png c.png

to create a new file, c.png, that has the a.png on the left and b.png on the right. Alternatively, you append them vertically with -append (instead of +) and a.png will be on top of b.png. With convert, you can do a ton of other things. For example, you can switch to a different image format for the output

$> convert +append a.png b.jpg c.tif

This isn't a GUI application, but maybe some others might have a better solution. Alternatively, you could put this in some sort of automator script.

share|improve this answer
1  
Ah, thanks! Looks like ImageMagick offers several ways to do this; I just finished writing down how I solved it with ImageMagick. :) –  Jonik Jun 4 '12 at 20:38
2  
I tried cm2's answer on OS X Mountain Lion with ImageMagick 6.8, and I found that the append flag combined the images the other way around; -append combined the images side by side, and +append one on top of the other. –  ysim Jun 6 '13 at 16:50
    
Interesting that the behavior changed. I was using ImageMagick 6.7.2 when the append behaved as described in the answer. –  cm2 Jun 6 '13 at 23:37
add comment

Here's one way I just managed to solve this with.

Disclaimer: If you are not familiar with the Unix command line, you may want to pick one of the GUI-oriented solutions that others have posted.

Install the ImageMagick graphics suite, e.g. with Homebrew:

brew install ImageMagick

Alternatively, use MacPorts ( sudo port install ImageMagick) or the Mac OS X binary release provided by ImageMagick. In my experience, Homebrew is the quickest, most hassle-free option.

Once you have ImageMagick installed, it's simple. Using Terminal, navigate to the directory containing the images, and create a combined version with a command such as:

montage -geometry 100% left.jpg right.jpg merged.jpg

There's multitude of options available; to learn about them, see: http://www.imagemagick.org/script/montage.php

share|improve this answer
    
If there's an easier way install ImageMagick on OS X, please leave a comment, and I'll edit the answer accordingly... –  Jonik Jun 4 '12 at 20:34
4  
You can use brew install ImageMagick, if you have homebrew installed. Which you should. –  Matthew Schinckel Jun 5 '12 at 11:47
    
@Matthew: what makes Homebrew better than MacPorts? –  Jonik Jun 5 '12 at 18:04
    
    
(Having used Homebrew now for 6 months or so, I agree with @Matthew, it's been way better than MacPorts.) –  Jonik Jul 16 '13 at 14:57
add comment

Speaking of free GUI tools, Seashore App is an open source project much better at working with images than Preview.app.

It has better tools much on the lines of popular editors (including shortcuts) and I guess if you try you should be doing just fine without much help from us.

It supports layers, filters, channels and supports almost all image formats, plus it has better image / layer selection and resizing tools that may be better suited for your image editing needs.

  1. Open both the images with Seashore.
  2. Copy over the second one into the first one. Seashore will ask you if you want to create a New Layer or Anchor it with the one already there. (see screenshot).
  3. Click on New Layer.
  4. Use the Move tool (right most selected button in toolbar in the screenshot) to align your layer to the right of the previous one.
  5. Choose Image boundaries option from Image menu (Third item from top Cmd + Opt + C) increase the image boundary to the Right in your case by the current width of the image (assuming both images are of same size).
  6. Save as png or jpg according to your needs.

Voila!

enter image description here

share|improve this answer
add comment

Pixelmator is only around $30 from the app store and its a full photoshop replacement for 99% of users. It will merge your images and do a thousand other things besides. Highly recommended.

share|improve this answer
    
While there are a few free alternatives in this thread, +1 for Pixelmator which can do this and much more for a good price. –  Gerry Jun 5 '12 at 6:41
add comment

There is Graphic Converter (free to try). So you could: open new picture 640 x 480; then in turn open each of the components, copy all, and paste into the new picture. Drag them into place where you want them. Then Save As... the format you want.

share|improve this answer
    
I haven't specifically tested this, but GraphicConverter has a very powerful batch-processing feature for sequences of image-processing routines, including some Automator and AppleScript support. I'll bet you can find a way to create a batch process that will do what you need in GraphicConverter. –  Wheat Williams Jun 5 '12 at 0:36
add comment

Do it online for free...

http://www.quickpicturetools.com

Beats messing around or installing other programs.

share|improve this answer
add comment

The easiest way is to use Graphic Converter. Open the Convert and Modify window, select all the images you want to stitch together on the left hand selection pane, and select a folder for the output in the right hand selection pane (otherwise you might overwrite your originals).

On the left hand side of the main window select Function -> Concat....

Click GO (LHS at bottom), this will open a dialogue box that asks if you want them arranged in a row only, column only or a matrix of N x M images.

share|improve this answer
    
At least my Macs (running OS X 10.6.8 and 10.8.4) don't seem to have Graphic Converter pre-installed, so this is not necessarily the easiest way. –  Jonik Oct 31 '13 at 18:10
add comment

I'm a know-nothing when it comes to computers, but this question is all over the internet.

I make all kinds of pictures in Pages, then save the page as a pdf. I open the pdf in Preview and resave it as a jpg. Then I import the jpg in iphoto and do whatever I want to it there - crop it or play with the colors etc. Then I mail it to myself in whatever size I want. This is serious silliness by most people's standards.

Well it works - and you don't have to be a geek to do it :)

share|improve this answer
add comment

How to Combine Images on Mac OS X

How to Combine Images on Mac OS X. Make two pictures into single one.

share|improve this answer
1  
Answers on Ask Different need to be more than just a link. It's okay to include a link, but please summarize or excerpt it in the answer. The idea is to make the answer stand alone. Also please read the section about self-promotion in the faq. –  patrix Jan 21 at 8:20
add comment

Open both images side by side in Preview, take a screenshot with command-shift-4.

share|improve this answer
    
If they are scaled you will lose a lot of DPI. You better use photoshop –  Rob Apr 16 at 14:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.