Extract Pictures from PowerPoint with C# REST API

This article guides on how to extract pictures from PowerPoint with C# REST API. You will learn to automatically retrieve images on PowerPoint with C# REST Interface using a .NET-based cloud SDK. It will share details to extract all the images or fetch selected images from the presentation.

Prerequisite

Steps to Extract PowerPoint Pics with C# REST API

  1. Initialize the SlidesApi object to extract pictures using the Client ID and secret
  2. Upload the PowerPoint file with images to Aspose cloud storage
  3. Download all the images from the PowerPoint presentation in a ZIP file using the DownloadImagesDefaultFormat() method
  4. Save the ZIP file containing all extracted images to the local storage
  5. Download a single image from the PowerPoint presentation
  6. Save the extracted single image as a PNG file to the local storage

These steps describe how to fetch PowerPoint presentation images with C# .NET-based API. Initialize the SlidesApi object, upload the presentation to the server, download all the images as a ZIP stream from the API response, and save them on the disk. Use the DownloadImageDefaultFormat() method to fetch the desired image only by providing the image index in the presentation.

Code to Extract Pictures in Presentations with C# RESTful Service

This code demonstrates how to extract pictures from PowerPoint with C# Low Code API. The DownloadImagesDefaultFormat() method takes the presentation file name and returns a ZIP stream that is saved on the local storage. All the files in the ZIP file contain the default image type.

This article has taught us the extraction of PowerPoint slides images with C# REST Interface. To add a watermark in a presentation, refer to the article Add watermark to PPT with C# REST API.

 English