Compare commits
5 Commits
242c0bbbf7
...
d09782367b
Author | SHA1 | Date |
---|---|---|
Matt McWilliams | d09782367b | |
Matt McWilliams | 67c71d683d | |
Matt McWilliams | 389224377a | |
Matt McWilliams | ce27470a87 | |
Matt McWilliams | 4ff45e8535 |
|
@ -1 +1,5 @@
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
|
*.png
|
||||||
|
*.webm
|
||||||
|
*.mkv
|
||||||
|
test_svg
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
INPUT="${1}"
|
||||||
|
OUTPUT="${2}"
|
||||||
|
|
||||||
|
WIDTH=323
|
||||||
|
HEIGHT=242
|
||||||
|
|
||||||
|
mkdir -p "${OUTPUT}"
|
||||||
|
|
||||||
|
ffmpeg -re -i "${INPUT}" \
|
||||||
|
-f image2 \
|
||||||
|
-r 12 \
|
||||||
|
-vf crop=in_h/3*4:in_h,scale=$WIDTH:$HEIGHT,setsar=1:1 \
|
||||||
|
"${OUTPUT}/image_%06d.png"
|
8
loop.sh
8
loop.sh
|
@ -17,13 +17,13 @@ for svg in "${1}"*.svg ; do
|
||||||
name=`echo "${filename}" | cut -d'.' -f1`
|
name=`echo "${filename}" | cut -d'.' -f1`
|
||||||
num=`echo "${name}" | awk -F'_' '{print $(NF)}'`
|
num=`echo "${name}" | awk -F'_' '{print $(NF)}'`
|
||||||
echo "Drawing $svg file..."
|
echo "Drawing $svg file..."
|
||||||
#bash position.sh set
|
bash position.sh set
|
||||||
#ax guides/guide_marks.svg
|
ax guides/guide_marks.svg
|
||||||
number=`mktemp`.svg
|
number=`mktemp`.svg
|
||||||
node ./numbers/ -n "${num}" -o "${number}"
|
node ./numbers/ -n "${num}" -o "${number}"
|
||||||
#ax "${number}"
|
ax "${number}"
|
||||||
rm -f "${number}"
|
rm -f "${number}"
|
||||||
#bash position.sh reset
|
bash position.sh reset
|
||||||
echo "Are you ready to continue? (yes/no)"
|
echo "Are you ready to continue? (yes/no)"
|
||||||
read input
|
read input
|
||||||
if [ "$input" != "n" ] && [ "$input" != "no" ]
|
if [ "$input" != "n" ] && [ "$input" != "no" ]
|
||||||
|
|
|
@ -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
|
2
white.sh
2
white.sh
|
@ -11,7 +11,7 @@ HEIGHT=374
|
||||||
#convert image.jpg -background white -gravity center -extent 800x800 output.jpg
|
#convert image.jpg -background white -gravity center -extent 800x800 output.jpg
|
||||||
|
|
||||||
convert -size ${WIDTH}x${HEIGHT} xc:#FFFFFF white.png
|
convert -size ${WIDTH}x${HEIGHT} xc:#FFFFFF white.png
|
||||||
composite -gravity Center white.png "${1}" "${2}"
|
composite -gravity Center "${1}" white.png "${2}"
|
||||||
rm white.png
|
rm white.png
|
||||||
|
|
||||||
echo "Centered in white ${1} -> ${2}"
|
echo "Centered in white ${1} -> ${2}"
|
Loading…
Reference in New Issue