#!/bin/bash #file number to start with COUNT=1 # 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 #increase b&w character by lowering threshold to 50%, then using the compose argument multiply to replace all white parts #of the b&w film with background image convert sympony/deinterlace_$VAR.png -threshold 50% play/$VAR.png -compose multiply -composite threshold_overlay/overlay_$VAR.png echo $VAR #add 1 to the number of the last runthrough let COUNT=COUNT+1 done