Access GIF frames with C#
问题 I'm a beginner in C#. I would like to know if there's a way to access different frames inside a GIF animation with C#. I'm using Visual Studio 2008. 回答1: Try this: using System.Drawing; using System.Drawing.Imaging; Image gifImg = Image.FromFile(pathToGifFile); FrameDimension dimension = new FrameDimension(gifImg.FrameDimensionsList[0]); // Number of frames int frameCount = gifImg.GetFrameCount(dimension); // Return an Image at a certain index gifImg.SelectActiveFrame(dimension, index); 回答2: