Creating a contact sheet using ImageMagick on OSX

Creating Contact Sheets From Images on OSX

There are probably a million ways to do this. I like this one (mainly because it worked and was painless.)

Install ImageMagick for Mac OS X

Visit and download the second-listed ImageMagick installer. It’s labeled ImageMagick 6.8.7–2 for Mac OS X 10.5 – 10.9 requires XQuartz. If you don’t already have XQuartz installed, you will need that as well. Second, on the same page download and install GhostScript 9.07 for Mac OS X 10.5 – 10.9.

Install this useful bash script

Now that you have ImageMagick up and running, visit this site: and save out the bash script there as something like “”. One way to do that is to copy all of the code from the script and then open a terminal window.

In the terminal window, do cat > and hit Enter. You will see a blinking cursor on the screen. Now use cmd-V or similar to paste the text into the open terminal window. Hit ctrl-D to end the copy and this will save everything you pasted into the file Now that you’ve done that, you can change the script to make it so that you can execute it from the terminal command line. Do this: chmod +x ./ and hit Enter. Now you have an executable “program” in your home directory named

Still in the terminal window, navigate to a folder  with a bunch of image files with file names ending in .jpg by doing something like cd myimages. Type ~/ and the script will run. It will do two things. First, it will create a folder named “thumb”, which will contain 600×600 pixel thumbnails of your original images. Secondly, it will create a folder called “contact”, which will have a file named 1.jpg, 2.jpg, etc. for each page of contact sheet images. When I ran it, I got 12 images per page.

You can combine these jpg images into a single PDF using an old trick. Select all of the contact sheets, and open them with Click in the thumbnail tray and select all of the images. Then use File > Print and save them as a single PDF.


  1. The script requires that the images be jpeg images and it requires that the filenames end in lower-cased jpg, exactly. Otherwise, it will not find the files and you won’t get the results you expect.
  2. You’re installing some new software on your computer. You should probably visit the ImageMagick site and see what it’s all about. It’s a fantastic (though occasionally frustrating ) suite of image manipulation programs. You should also read the bash script and make sure that you understand what’s it’s doing. If you read the script, you’ll see that there are some choices you can make about the image resizing/resampling algorithm to improve image quality.

Hope this is helpful! This is a great set of tools and I applaud cactus lab for making ImageMagick so easy to install on OSX and I appreciate John Hobbs’s script from his site that makes the magic happen.


2 thoughts on “Creating a contact sheet using ImageMagick on OSX

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s