#!/bin/bash #file number to start with COUNT=1 # angle of the pictures in the first file ANGLE=0 # total number of original files OTOTAL=99 # loop to call up the files to process. calls up files numbered from 000-999 in accending order while [ $COUNT -le $OTOTAL ]; do if [ $COUNT -le $OTOTAL ]; then VAR=`printf "%03d" $COUNT` fi #append the jpgs counting from 001-099 into 2x2 square jpeg with the numbers 001-099 #resize the file. rotate them by the current angle convert \( -size 360x288 xc:blue -background blue \( hans/$VAR.jpg -resize 224x180 -rotate $ANGLE \) -gravity Center -composite \) \( -size 360x288 xc:blue -background blue \( platte/$VAR.jpg -resize 224x180 -rotate $ANGLE \) -gravity Center -composite \) +append \( \( -size 360x288 xc:blue -background blue \( altona/$VAR.jpg -resize 224x180 -rotate $ANGLE \) -gravity Center -composite \) \( -size 360x288 xc:blue -background blue \( contain/$VAR.jpg -resize 224x180 -rotate $ANGLE \) -gravity Center -composite \) +append \) -append smallswirl_$VAR.jpg echo $VAR #add 1 to the number of the last runthrough let COUNT=COUNT+1 #calculate the angle for the current runthrough. current angle + 3.65. For 99 files this will complete a 360 ANGLE=$(echo "scale=2; $ANGLE + 3.64" | bc) done