views:

41

answers:

1

In C#, I can get the individual frames from a gif and show the animation easily enough, but how do you go about getting the timing information for each frame?

+1  A: 

Take a look at this code

    try 
    {
        PropertyItem item = img.GetPropertyItem (0x5100); // FrameDelay in libgdiplus
        // Time is in 1/100th of a second
        delay = (item.Value [0] + item.Value [1] * 256) * 10;
    } 
    catch 
    {
        delay = 200;
    }

I've took it from here .

Also this article will be useful.

Orsol
Outstanding, thank you.
Andy