Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active February 24, 2022 15:44
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/f5069f87659431e7bf30e4679558880c to your computer and use it in GitHub Desktop.
Save aspose-com-gists/f5069f87659431e7bf30e4679558880c to your computer and use it in GitHub Desktop.
Convert PowerPoint PPT/PPTX to Animated GIF in Python
import aspose.slides as slides
import aspose.pydrawing as drawing
# Load presentation
with slides.Presentation("presentation.pptx") as presentation:
# Set additional options
options = slides.export.GifOptions()
options.frame_size = drawing.Size(960, 720) # the size of the resultant GIF
options.default_delay = 2000 # how long each slide will be showed before moving to the next one
options.transition_fps = 35 # increase FPS for better transition animation quality
# Save as GIF
presentation.save("ppt-to-gif.gif", slides.export.SaveFormat.GIF, options)
import aspose.slides as slides
# Load presentation
with slides.Presentation("presentation.pptx") as presentation:
# Save as GIF
presentation.save("ppt-to-gif.gif", slides.export.SaveFormat.GIF)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment