获得一个GIF动画的帧持续时间? [英] Getting the frame duration of an animated GIF?

查看:550
本文介绍了获得一个GIF动画的帧持续时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中,我可以从一个GIF的各帧,并显示动画很轻松了,但你如何去获得定时信息的每一帧?


解决方案

  PropertyItem项目= img.GetPropertyItem(0x5100); // FrameDelay在libgdiplus 
//时间处于第二
延迟的1/100分之=(item.Value [0] + item.Value [1] * 256)* 10;

文章可能是有用的。


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?

解决方案

PropertyItem item = img.GetPropertyItem (0x5100); // FrameDelay in libgdiplus
// Time is in 1/100ths of a second
delay = (item.Value [0] + item.Value [1] * 256) * 10;

This article may be useful.

这篇关于获得一个GIF动画的帧持续时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆