Category Archives: Apps

Using ImageMagick to create a POD ready sheet

My local playtesting group was discussing print-on-demand providers for prototypes and we’d gotten into some of the nitty-gritty of laying out card images.

Print Play Games has some of the best services we’ve encountered, but have also found that the document setup can be a little bit painful compared to The Game Crafter’s online tools. One person mentioned the venerable ImageMagick as an option for quickly creating thumbnail sheets from individual card images, while also bemoaning the complicated-ness of figuring out precisely what the command-line needed to look like and hoping out loud that someone would write it up and share.

Since this is quite in my wheelhouse, I took it upon myself to create these command lines and after about an hour or two, have successfully written a command-line that processes a set of appropriately set-up individual card images into a PPG-ready file in an instant.

How to prepare your raw cards

Your cards should have the dimensions 1125x825px, which is a poker card on its side, accounting for 1/8″ bleed. For this command line, they’ll need to be named cards-1.png through cards-18.png.

How to set up your computer

There’s a link above to the ImageMagick tool, which has many installers available. Install it.

You’ll also need a transparent image with the dimensions 3600x5400px (or 12″x18″ aka “Tabloid Extra”), named ppg_blank.png.

The Command-line

If you’ve followed instructions precisely, you should be able to navigate to the directory that contains all your individual card files and run these two commands.

montage \
 cards-{1..18}.png -tile 3x6\
 -geometry '1x1<'+0+0 card_montage.png

composite card_montage.png\
 -geometry +112+225 ppg_blank.png finish.png

This command line can be pretty dense, so let’s unpack it a little bit. First, we’re running an ImageMagick tool named “montage” which takes a series of images and makes a thumbnail sheet. Then we’re adding our series of card images using a Unix short-cut for sequential filenames: {1..18}. The -tile and -geometry are called “flags” which let us tell the montage application how to process these files, e.g. we’re creating a 3-wide 6-tall tile grid, and NOT resizing anything, and NOT putting any space in between these images. Finally, we’re outputting a new file called “card_montage.png.”

The second one is a little easier. We’re using a tool called “composite” and using the -geometry flag to overlay our card_montage.jpg file and then offset it over the larger ppg_blank.png file. (recall: 1125 * 3 = 3375, which is less than the 3600. An 112px horizontal inset will center it within 0.5 pixels, and the same vertically). Finally, we’re writing that out to a file named “finish.png.”

This last output precisely matches PrintPlayGames poker card template, making it easy to upload a correctly set-up file!