GIF抽帧

private void GetFrames(string pPath,  string pSavedPath)

     {

         DrawImage.Image gif = DrawImage.Image.FromFile(pPath);

         Imaging.FrameDimension fd = new Imaging.FrameDimension(gif.FrameDimensionsList[0]);

         int count = gif.GetFrameCount(fd);

         for (int i = 0; i < count; i++)

         {

             gif.SelectActiveFrame(fd, i);

             gif.Save(pSavedPath + "\\frame_" + i + ".jpg", ImageFormat.Jpeg);

         }

     }

 

你可能感兴趣的:(gif)