#!/bin/sh | |
# | |
# Create a animation of of a rotating image. | |
# Some alpha composition is used to crop the result to the original size. | |
# | |
command="convert -delay 10 $1 -resize 50% -trim +repage -bordercolor white" | |
command="$command \\( +clone -border 1x1 -fill lightsteelblue" | |
command="$command -colorize 100% \\) -gravity center" | |
for i in `seq 100 -2 20 ;`; do | |
command="$command \\( -clone 0 -liquid-rescale 100%x${i}\!" | |
command="$command -border 1x1 -clone 1 +swap -composite \\)" | |
done | |
# remove source images | |
command="$command -delete 0,1" | |
# duplicate frames to reverse | |
command="$command \\( -clone -2-1 \\)" | |
# write out animation | |
command="$command -layers Optimize -loop 0 animated_lqr.gif" | |
eval $command | |
chmod 644 animated_lqr.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment