imagemagick - Is this GIF a still image or an animation? (in Ruby) -


how can use rmagick determine how many frames remote gif has?

you can use magick::imagelist#length:

returns number of images in imagelist.

for example, remote gif:

has 12 frames:

require 'rmagick' magick::imagelist.new('https://i.giphy.com/zllydol7ndm7c.gif').length #=> 12 

Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -