ruby on rails - How to tell if GIF is animated? -


i have rails app paperclip image uploads -- how check if image animated gif rmagick?

you can count scenes associated image. in rmagick means doing this:

image = magick::imagelist.new(image_file)  if image.scene == 0   #this not animated gif else   #this animated gif end 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -