Convert PowerPoint to Animated GIF

Converting Presentations to Animated GIF Using Default Settings

This sample code in JavaScript shows you how to convert a presentation to animated GIF using standard settings:

var pres = new aspose.slides.Presentation("pres.pptx");
try {
    pres.save("pres.gif", aspose.slides.SaveFormat.Gif);
} finally {
    if (pres != null) {
        pres.dispose();
    }
}

The animated GIF will be created with default parameters.

Converting Presentations to Animated GIF Using Custom Settings

This sample code shows you how to convert a presentation to animated GIF using custom settings in JavaScript:

var pres = new aspose.slides.Presentation("pres.pptx");
try {
    var gifOptions = new aspose.slides.GifOptions();
    gifOptions.setFrameSize(java.newInstanceSync("java.awt.Dimension", 960, 720));// the size of the resulted GIF
    gifOptions.setDefaultDelay(2000);// how long each slide will be showed until it will be changed to the next one
    gifOptions.setTransitionFps(35);// increase FPS to better transition animation quality
    pres.save("pres.gif", aspose.slides.SaveFormat.Gif, gifOptions);
} finally {
    if (pres != null) {
        pres.dispose();
    }
}