Last active
January 25, 2019 08:19
-
-
Save hitode909/e4f696869681977c1db6ba6228ad7868 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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