How can I detect that a gif is animated?

MagickWand for PHP is an object-oriented PHP interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning MagickWand for PHP.
Post Reply
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: How can I detect that a gif is animated?

Post by anthony »

An animated GIF has multiple image frames.

Of course not all multiple frame GIF images are ment to be animated. I sometimes use it as a image archive for non-animation purposes. But that is a special case.
In general the above is true.

As such..

Code: Select all

  identify -format %n  posible_animation.gif
will tell you the number of frames in the image file format.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply