Friday, March 8, 2013

Merge images

I have a couple of sets of related density plots (each set with ~9 images) that I need to enter into a report. I'm feeling lazy today and don't want to go through the pain of uploading each of these to our internal wiki so I merged them instead.

The montage program (part of the ImageMagick suite of tools) is really simple and effective for this:

montage -geometry +2+2 -tile 2x -shadow <filenames>+ merged_file.png
view raw gistfile1.sh hosted with ❤ by GitHub
Hey presto a set of merged density plots laid out into two columns (regardless of the number of images) with some spacing between them and a bit of drop shadow to visually separate the plots.