Image Magic (a sweet set of command line tools for image manipulation found on most linux and mac boxes) has tools for this sort of thing.
I think the tool you'd be looking for is called combine. You could then mogrify the image to play with it's size.
as a side note, mogrify is great for resizing a directory full of images, something like mogrify -resize %50 *.jpg or mogrify -resize 800x600 *.jpg. Makes email sizing lots of photos really easy.