#!/bin/bash #file number to start with COUNT=1 # total number of original files OTOTAL=200 # 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 # the two animations are given perspective by shrinking their width toward the middle of the picture. convert \( grozny/$VAR.png -matte -virtual-pixel background -background black \ -distort Perspective '0,0 360,80 0,480 360,400 720,0 720,0 720,480 720,480' \) \ \( sara/$VAR.png -matte -virtual-pixel transparent \ -distort Perspective '0,0 0,0 0,480 0,480 720,0 360,80 720,480 360,400' \) -composite pers_$VAR.png echo $VAR #add 1 to the number of the last runthrough let COUNT=COUNT+1 done