assemble images randomly

September 5th, 2013

Want to assemble images randomly into one? That’s easy in the command line if you have imagemagick installed:

Assuming you have all pictures in the current directory:

for i in *jpg ; do mv \"$i\" $RANDOM.jpg ; done

this renames all files ending in jpg into files that have a random number. Files might get overwritten should the random number come up again.

Assembling is as well:

montage *jpg -mode concatenate outputfilename.jpg

If you would run this again outputfilename.jpg would be a used as source image as well.