#!/bin/bash # number to start with to call the original files (usually not changed) COUNT=1 # number to start with to name the new files (usually not changed) COUNT2=1 # total number of original files OTOTAL=99 # total number of end files ETOTAL=200 # Top Y position of masked line YVALUE=-40 # Left X position of masked line XVALUE=-40 # Bottom Y position YVALUE2=520 # Right X position XVALUE2=760 while [ $COUNT -le $OTOTAL ]; do if [ $COUNT -lt $OTOTAL ]; then VAR=`printf "%03d" $COUNT` elif [ $COUNT -eq $OTOTAL ]; then COUNT=0 VAR=0$OTOTAL fi # create an image animation where lines move across the screen which will be used as masks. # an animation shows through the masked line animation on a third animation. convert -size 720x480 xc:black -stroke white -strokewidth 40 -draw "line 0,$YVALUE 720,$YVALUE" -draw "line $XVALUE,0 $XVALUE,480" -draw "line $XVALUE2,0 $XVALUE2,480" -draw "line 0,$YVALUE2 720,$YVALUE2" $VAR.png && composite platte720x480png/$VAR.png agfa720x480png/$VAR.png $VAR.png -compose src-over movie/$VAR2.png echo $VAR2 let COUNT=COUNT+1 #add to x position to move the line mask XVALUE=$(echo "scale=2; $XVALUE + ( 800 / $ETOTAL )" | bc) #add to y position to move the line mask YVALUE=$(echo "scale=2; $YVALUE + ( 560 / $ETOTAL )" | bc) #subtract from x position of the second line mask XVALUE2=$(echo "scale=2; $XVALUE2 - ( 800 / $ETOTAL )" | bc) #subtract from y position of the second line mask YVALUE2=$(echo "scale=2; $YVALUE2 - ( 560 / $ETOTAL )" | bc) # creates the names for the end files if [ $COUNT2 -le $ETOTAL ]; then VAR2=`printf "%04d" $COUNT2` elif [ $COUNT2 -gt $ETOTAL ]; then break fi let COUNT2=COUNT2+1 done