Skip to content

Instantly share code, notes, and snippets.

@mmb
Created December 2, 2014 05:09
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 mmb/4e8c497437e7c7b74dc1 to your computer and use it in GitHub Desktop.
Save mmb/4e8c497437e7c7b74dc1 to your computer and use it in GitHub Desktop.
How to tell if an image is animated using rmagick
require 'rmagick'
img_list = Magick::ImageList.new('http://i.imgur.com/Txjn52a.gif')
p img_list.size
img_list = Magick::ImageList.new('http://i.imgur.com/UthfKGQ.jpg')
p img_list.size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment