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
633 B

#!/bin/sh
source ./shakeoffsets.sh
declare -a shakeOffsets
getShakeOffsets shakeOffsets
SOURCEBASE=$1
SOURCESVG=`printf "%s.svg" $SOURCEBASE`
TARGETSVG=`printf "export/%s.png" $SOURCEBASE`
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`
inkscape -z -e $file -a $offset $SOURCESVG
((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
apngasm -o $TARGETSVG ${args[@]}
rm -f export_tmp/*