开发者

Getting the frame duration of an animated GIF?

开发者 https://www.devze.com 2023-01-17 15:30 出处:网络
In C#, I can get t开发者_如何学JAVAhe individual frames from a gif and show the animation easily enough, but how do you go about getting the timing information for each frame?PropertyItem item = img.G

In C#, I can get t开发者_如何学JAVAhe individual frames from a gif and show the animation easily enough, but how do you go about getting the timing information for each frame?


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

精彩评论

暂无评论...
验证码 换一张
取 消