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

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

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

asp.net mvc - breakpoint on javascript in CSHTML? -