nejcPirc has asked for the wisdom of the Perl Monks concerning the following question:

Hello frieds
Do you know how to recognize ANIMATED GIF and NON-ANIMATED GIF(when uploading)?
I tried:
$format=$image->Get("format");

But the output of $format is the same with animated/non-animated GIF ->$format="CompuServe graphics interchange format"

Do you know, how to distinguish animated from non-animated?

Thanx a lot, Nejc

Replies are listed 'Best First'.
Re: Image::Magick - animated GIF
by Corion (Patriarch) on Jan 28, 2005 at 12:59 UTC

    Image::Magick makes a sequence of images available through the array that the object references:

    printf "This image has %s element(s)\n", @$image;
      It's working great! Txanx man:)
Re: Image::Magick - animated GIF
by Anonymous Monk on Jan 28, 2005 at 13:57 UTC
      Image::Info should be faster than Image::Magick since Image::Info ignores the actual image, paying attention only to the meta data.
Re: Image::Magick - animated GIF
by zentara (Cardinal) on Jan 28, 2005 at 18:18 UTC
    Does anyone know if you can reliably use the GIF header...GIF89a ..vs...GIF87a to detect if it's animated? It seems all the animated gifs I see are GIF89a.

    I'm not really a human, but I play one on earth. flash japh