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
Post a Comment