views:

35

answers:

1

I'm looking for a way to detect the (average) frame rate of an animated GIF using Linux. PHP's Imagick class seems to provide this functionality but I rather avoid installing a ton of libraries to get it to work.

http://www.php.net/manual/en/function.imagick-getimagetickspersecond.php

Is there a simple way to do this?

+2  A: 

I think ImageMagick really is your best bet.

This is what a identify filename.gif on an animated GIF looks like:

gif.gif[1] GIF 350x350 350x350+0+0 8-bit PseudoClass 256c 145KB 0.000u 0:00.003
gif.gif[2] GIF 350x350 350x350+0+0 8-bit PseudoClass 256c 145KB 0.000u 0:00.006
gif.gif[3] GIF 350x350 350x350+0+0 8-bit PseudoClass 256c 145KB 0.000u 0:00.010

this doesn't give you the frame rate - which is good, because animated GIFs don't have a global frame rate, they have an individual one between frames.

Pekka
Even better! This is what I was after.
ElbertF