Perhaps this will do what you want. Caution: this is a Windows 7 script.
Code: Select all
set SRC=\pictures\20091205\
del *.png
for %%F in (%SRC%*.jpg) do "%IMG%convert" %%F -gamma .45455 -resize "32x32^^" -crop 32x32+0+0 +repage -gamma 2.2 !RANDOM!_%%~nF.png
"%IMG%montage" *.png -geometry 32x32+0+0 -tile 10x10 collage.jpg
Notes:
!RANDOM! will be a random integer each time it is used.
%%~nF will include the original filename (without path or extension) in case two images get the same random number.
If more than 100 input images, we will get multiple outputs.
You can change 32x32 throughout to some other rectangle. Likewise the 10x10 (columns and rows in the output).
Images won't repeat.
%IMG% points to my IM directory. Most people won't need this.