【问题标题】:Getting the frame duration of an animated GIF?获取动画 GIF 的帧持续时间?
【发布时间】:2018-01-30 03:35:56
【问题描述】:

在 C# 中,我可以从 gif 中获取单个帧并轻松显示动画,但是如何获取每个帧的时间信息?

【问题讨论】:

    标签: c# .net animated-gif


    【解决方案1】:
    PropertyItem item = img.GetPropertyItem (0x5100); // FrameDelay in libgdiplus
    // Time is in milliseconds
    delay = (item.Value [0] + item.Value [1] * 256) * 10;
    

    This 文章可能有用。

    【讨论】:

    • 澄清一下:GIF 将间隔存储在 s/100 中。变量delay 包含以毫秒为单位的时间间隔。
    猜你喜欢
    • 2013-08-21
    • 1970-01-01
    • 2012-11-17
    • 1970-01-01
    • 2018-06-15
    • 2021-02-04
    • 1970-01-01
    • 2010-11-11
    • 2014-03-27
    相关资源
    最近更新 更多