Convert to Image

This demo uses the DevExpress Presentation API to export presentation slides to images (BMP, PNG, JPEG, SVG). You can use the predefined sample file or upload your own presentation. To do the latter, select Upload a File in the file selection drop-down menu.

In the Image Export Settings panel, specify required image settings and select slides to export. Use the Convert to... dropdown button to select the output format, convert presentation slides, and download image files.

Select a Document
Sample.pptx



using DevExpress.Docs.Presentation;
using DevExpress.Drawing;

IReadOnlyList<Stream> ConvertToImages(Stream inputStream, DXImageFormat imageFormat, int resolution, List<int> slideIndexes) {
    var outputStreams = new List<Stream>();
    using var presentation = new Presentation(inputStream);
    var images = presentation.ExportToImages(new ImageExportOptions { Resolution = resolution }, slideIndexes.ToArray());
    foreach(var image in images) {
        var outputStream = new MemoryStream();
        image.Save(outputStream, imageFormat);
        outputStream.Position = 0;
        outputStreams.Add(outputStream);
    }
    return outputStreams.AsReadOnly();
}