public void gif()
{
string path = @"D:gif";
String[] imageFilePaths =
new String[] { @"D:gif1.png", @path + @"2.png", @path + @"3.png", @path + @"4.png" };
String outputFilePath = @path + @"test.gif";
AnimatedGifEncoder e = new AnimatedGifEncoder();
e.Start(outputFilePath);
e.SetDelay(500);
e.SetRepeat(0);
for (int i = 0, count = imageFilePaths.Length; i < count; i++)
{
e.AddFrame(Image.FromFile(imageFilePaths[i]));
}
e.Finish();
}
Для работы вам необходимо подключить следующее пространство имен: using Gif.Components;
Ссылка на библиотеку: Rusfolder.net
0.00 (0%) 0 votes











