diff --git a/stipple.sh b/stipple.sh new file mode 100644 index 0000000..ab63943 --- /dev/null +++ b/stipple.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +INPUT=`realpath "${1}"` +OUTPUT=`realpath "${2}"` + +WIDTH=404 +HEIGHT=374 +DOTSIZE=4 +MAXGENERATIONS=25 +MAXPARTICLES=500 +MINDOTSIZE=0.8 +LINE=0.8 +FILL=true + +#files in dir +for png in "${INPUT}/"*.png ; do + filename=`basename "${png}"` + name=`echo "${filename}" | cut -d'.' -f1` + num=`echo "${name}" | awk -F'_' '{print $(NF)}'` + tmp=`mktemp`.png + bash white.sh "${png}" "${tmp}" + cd ~/src/stipple_gen/ + bash stipple_gen.sh \ + --inputImage "${tmp}" \ + --outputImage "${OUTPUT}/${name}_rendered.png" \ + --outputSVG "${OUTPUT}/${name}.svg" \ + --canvasWidth $WIDTH \ + --canvasHeight $HEIGHT \ + --dotSizeFactor $DOTSIZE \ + --windowWidth $WIDTH \ + --windowHeight $HEIGHT \ + --maxGenerations $MAXGENERATIONS \ + --minDotSize $MINDOTSIZE \ + --line $LINE \ + --fill $FILL \ + --maxParticles $MAXPARTICLES + rm "${tmp}" + cd ~/src/animation/ +done \ No newline at end of file