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

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

javascript - return highlighted cells to php -

java - Creating a room by reading from a file (for a game) -