Skip to content

Instantly share code, notes, and snippets.

@abachman
Forked from ngauthier/README.md
Created April 10, 2012 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abachman/2351649 to your computer and use it in GitHub Desktop.
Save abachman/2351649 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