Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active February 25, 2022 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/ba9d2232fc27cb0b4baa4b8e345e5fd1 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/ba9d2232fc27cb0b4baa4b8e345e5fd1 to your computer and use it in GitHub Desktop.
Convert PowerPoint PPT to Animated GIF in C#
// Load presentation
using (Presentation presentation = new Presentation("presentation.pptx"))
{
// Set GIF options
GifOptions options = new GifOptions();
options.FrameSize = new Size(960, 720); // the size of the resultant GIF
options.DefaultDelay = 2000; // how long each slide will be shown before moving to the next one
options.TransitionFps = 35; // increase FPS for better transition animation quality
// Save presentation as GIF
presentation.Save("ppt-to-gif.gif", SaveFormat.Gif);
}
// Load presentation
using (Presentation presentation = new Presentation("presentation.pptx"))
{
// Save presentation as GIF
presentation.Save("ppt-to-gif.gif", SaveFormat.Gif);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment