Skip to content

Instantly share code, notes, and snippets.

@ngauthier
Created April 9, 2012 13:57
Show Gist options
  • Save ngauthier/2343595 to your computer and use it in GitHub Desktop.
Save ngauthier/2343595 to your computer and use it in GitHub Desktop.

jitter.sh

For making your own jittergrams

Usage

Two files as input:

./jitter.sh file_01.jpg file_02.jpg

Wildcard match file_01.jpg file_02.jpg file_03.jpg etc.:

./jitter.sh file*
#!/bin/bash
a=()
i=0
for f in $*; do
convert -resize 480x480! $f $f.gif
a[$i]="$f.gif"
i=$i+1
done
gifsicle --colors 256 -O3 -d20 --loop -m ${a[@]} -o $1.jitter.gif
for f in $*; do
rm $f.gif
done
echo "Jittergram: $1.jitter.gif"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment