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?
Asked
Active
Viewed 7,060 times
1 Answers
14
PropertyItem item = img.GetPropertyItem (0x5100); // FrameDelay in libgdiplus
// Time is in milliseconds
delay = (item.Value [0] + item.Value [1] * 256) * 10;
This article may be useful.
Kempeth
- 1,766
- 2
- 18
- 35
Denis Palnitsky
- 18,027
- 13
- 45
- 55
-
To clarify: The GIF stores the interval in s/100. The variable `delay` contains the interval in milliseconds. – Kempeth Jan 30 '18 at 07:44