Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active February 25, 2022 10:16
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/9391d376590f7710bf30223c6ea86423 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/9391d376590f7710bf30223c6ea86423 to your computer and use it in GitHub Desktop.
Convert PowerPoint PPT/PPTX to Animated GIF in Java
// Load presentation
Presentation presentation = new Presentation("presentation.pptx");
// Set GIF options
GifOptions options = new GifOptions();
options.setFrameSize(new Dimension(960, 720)); // the size of the resultant GIF
options.setDefaultDelay(2000); // how long each slide will be shown before moving to the next one
options.setTransitionFps(35); // increase FPS for better transition animation quality
// Save presentation as GIF
presentation.save("ppt-to-gif.gif", SaveFormat.Gif, options);
// Load presentation
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