You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
634 B
39 lines
634 B
5 years ago
|
#!/bin/sh
|
||
|
|
||
|
source ./shakeoffsets.sh
|
||
|
|
||
|
declare -a shakeOffsets
|
||
|
getShakeOffsets shakeOffsets
|
||
|
|
||
5 years ago
|
SOURCEBASE=$1
|
||
|
SOURCESVG=`printf "%s.svg" $SOURCEBASE`
|
||
|
TARGETSVG=`printf "export/a%s.png" $SOURCEBASE`
|
||
|
|
||
5 years ago
|
|
||
|
mkdir -p export_tmp
|
||
|
rm -f export_tmp/*
|
||
|
|
||
|
|
||
|
counter=1
|
||
|
while [ $counter -le 75 ]
|
||
|
do
|
||
|
offset=${shakeOffsets[counter-1]}
|
||
|
file=`printf "export_tmp/%s.png" $counter`
|
||
5 years ago
|
inkscape -z -e $file -a $offset $SOURCESVG
|
||
5 years ago
|
((counter++))
|
||
|
done
|
||
|
|
||
|
|
||
|
declare -a args
|
||
|
|
||
|
counter=1
|
||
|
while [ $counter -le 75 ]
|
||
|
do
|
||
|
file=`printf "export_tmp/%s.png" $counter`
|
||
|
args+=($file 1:50)
|
||
|
((counter++))
|
||
|
done
|
||
|
|
||
5 years ago
|
apngasm -o $TARGETSVG ${args[@]}
|
||
5 years ago
|
rm -f export_tmp/*
|