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

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

问题描述

在 C# 中,我可以从 gif 中获取单个帧并很容易地显示动画,但是您如何获取每一帧的时间信息?

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 milliseconds
delay = (item.Value [0] + item.Value [1] * 256) * 10;

这篇文章可能有用.

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

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