diff --git a/tools/filler.sh b/tools/filler.sh new file mode 100755 index 0000000..a9343d1 --- /dev/null +++ b/tools/filler.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +set -e -u + +source tools/config.sh + +# traitement des arguments + +if [ $# -ne 1 ] ; then + echo "need the seq name" + exit 1 +fi +shortseq=$1 +framedir="frames/$shortseq" + +figlet "Seq $shortseq" +echo + +# a few molly guards + +if [ ! -d $framedir ] ; then + echo "NO DIR $framedir FOUND" + exit 2 +fi + +voidfile="/dev/shm/void-filler.tga" +# export TGA_OUTILS_VERBOSE="yes" +# tga_tools environ +tga_tools mk_hgrad $voidfile $Img_Width $Img_Height +tga_effects $voidfile water $voidfile 666 +tga_applymap 1 $voidfile neon.map $voidfile +# display $voidfile ; exit + +# ---------- main loop + +compte=0 +for idx in $(seq 0 $((NBFRAMES-1)) ) +do + + image=$(printf "%s/%05d.png" $framedir $idx) + + if [ -r $image ] ; then + echo "$image is OK" + else + echo "make $image" + txt=$(printf "%s ~ %03d" $shortseq $idx) + + convert $voidfile \ + -font Courier-Bold \ + -pointsize 110 \ + -kerning -1 \ + -gravity center \ + -fill $TEXTCOL \ + -annotate +0+0 "$txt" \ + -fill $STROKOL \ + -annotate +5+5 "$txt" \ + $image + compte=$(( compte + 1 )) + fi + +done + +echo "$shortseq gen $compte picz"