Skip to content

Instantly share code, notes, and snippets.

@charles-l
Created April 26, 2014 16:13
Show Gist options
  • Save charles-l/11324055 to your computer and use it in GitHub Desktop.
Save charles-l/11324055 to your computer and use it in GitHub Desktop.
Converts an animated gif to a spritesheet using ImageMagick
# Converts an animated gif to a spritesheet using ImageMagick
file_name=$(echo $1 | sed 's/\(.*\)\..*/\1/')
montage $1 -tile x1 -geometry '1x1+0+0<' -alpha On -background "rgba(0, 0, 0, 0.0)" -quality 100 $file_name.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment