Getting the frame duration of an animated GIF?

十年热恋 提交于 2019-12-19 03:11:31

问题


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:


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.



来源:https://stackoverflow.com/questions/3785031/getting-the-frame-duration-of-an-animated-gif

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!