【发布时间】:2015-10-08 16:27:45
【问题描述】:
我使用了how to create an animated gif in .net答案中的示例代码
即
System.Windows.Media.Imaging.GifBitmapEncoder gEnc = new GifBitmapEncoder();
foreach (System.Drawing.Bitmap bmpImage in images)
{
var src = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
bmpImage.GetHbitmap(),
IntPtr.Zero,
Int32Rect.Empty,
BitmapSizeOptions.FromEmptyOptions());
gEnc.Frames.Add(BitmapFrame.Create(src));
}
using(FileStream fs = new FileStream(path, FileMode.Create))
{
gEnc.Save(fs);
}
我现在想设置动画 gif 的速度。这方面的帮助是可怕的。有人知道怎么做吗?这肯定是可能的。这似乎是动画 gif 的一个基本功能,但他们似乎已经竭尽全力让它变得困难。
提前致谢。
【问题讨论】:
标签: c# .net animated-gif