Merge Images using Imagemagick Composite Utility

The following command replaces all images contained in the current folder as follows:

Each image will be copied into the center on top of the empty.gif. Thus, if you like to have a couple of images to fit 400×400 pixels then just create an empty.gif with that dimensions and run the command.

bash# PICS=ls -1; for pic in $PICS; do cp $pic temp.jpg; composite -gravity center temp.jpg ../empty.gif $pic; done; rm temp.jpg