Getting the frame duration of an animated GIF?

2019-02-13 20:23发布

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条回答
爷的心禁止访问
2楼-- · 2019-02-13 21:16
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.

查看更多
登录 后发表回答