However I'm finding that the randomness, well, just isn't really. On a batch of 20 images they'll be two maybe three different angles used in the whole bunch and always with the image tilted to the left. I'm also getting identical results on successive runs. I.e. If I run the code three times and then compare the three sets of resulting images then they're identical. Or at least they're identical as far as my eyes can tell.
Anyone have any insight in to why the randomness is so lacking and/or how to get some better randomness? I'm using openSUSE 11.1 x86_64, ImageMagick 6.4.3.
Code: Select all
for i in photos/*.jpg;do
pfn=`basename $i | sed 's/.jpg//'`
pin=`ls pin_*.png | sort -R | head -1`
composite -matte -gravity North ${pin} $i jpeg:- | convert - -bordercolor snow -background black +polaroid with_pin_${pfn}.png
done