Getting the frame duration of an animated GIF?

前端 未结 1 1015
半阙折子戏
半阙折子戏 2021-01-05 15:24

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条回答
  • 2021-01-05 15:54
    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.

    0 讨论(0)
提交回复
热议问题