#!/bin/bash #file number to start with COUNT=1 # total number of original files OTOTAL=99 # angle of the pictures in the first file ANGLE=0 # 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 into 2x2 square jpeg #use a matte to create a diffused circles #rotate them by the current angle convert \( matteblackblur.png \( platte/$VAR.jpg -rotate $ANGLE \) -gravity Center -compose Screen -composite \) \( matteblackblur.png \( altona/$VAR.jpg -rotate $ANGLE \) -gravity Center -compose Screen -composite \) +append \( \( matteblackblur.png \( contain/$VAR.jpg -rotate $ANGLE \) -gravity Center -compose Screen -composite \) \( matteblackblur.png \( hans/$VAR.jpg -rotate $ANGLE \) -gravity Center -compose Screen -composite \) +append \) -append rotate_matte_$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