3

How to save C# winforms Panel or PictureBox with animated elements to gif file? I also tried to do it like this

pictureBox2.Image.Save(System.IO.Path.Combine(
    Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "1.gif"),
    System.Drawing.Imaging.ImageFormat.Gif);

but it save just static image without animation.

  • 1
    Winforms is not capable of creating animated .gif files. You'll need to shop for another library that does support it. – Hans Passant Nov 28 '13 at 18:55
  • Try [GifBitmapEncoder](http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.gifbitmapencoder(v=vs.90).aspx)! – Nilay Vishwakarma May 08 '14 at 10:36
  • this might help: [There is a built in .NET class which will encode GIF files](http://stackoverflow.com/a/16598294/5887293) – KrisPus Jun 22 '16 at 03:53

1 Answers1

0

Take a look at this. The Bumpkit library he uses is open source, so you can just include the file you need in your solution.

Blue0500
  • 715
  • 8
  • 16