How to Create PowerPoint Slide Image using C#

This short tutorial is about how to create PowerPoint slide image using C# with the help of simple steps and a working sample code. You can use this application to generate Image from PowerPoint slide in C# without installing MS PowerPoint or any other third-party tool. The application can be used in any of .NET supported platforms including MS Windows, Linux or macOS.

Steps to Create PowerPoint Slide image using C#

  1. Configure the application project to install Aspose.Slides for .NET using the NuGet package manager
  2. Load the source presentation file using the Presentation class object to generate a slide image
  3. Access the first slide inside the presentation slides collection
  4. Set the user defined dimensions for the slide thumbnail
  5. Generate the slide thumbnail and save that on the disk in JPEG format

The above steps use the C# code to convert PowerPoint slide to image in JPEG format with the help of a few API calls only. We will load the source presentation file from the disk and access the desired slide in the slides collection. Then using GetThumbnail() method inside the Slide class, the image will be rendered and saved on the disk in JPEG format.

Code to Generate image from PowerPoint Slide in C#

For writing a presentation image creator C# based code is demonstrated here. You can customize the generated slide thumbnail by setting different rendering options like TiffOptions, DefaultRegularFont, NotesCommentsLayouting, Size and Image scaling options using different overloads of the GetThumbnail() method. The generated thumbnail can be stored in PNG, BMP or other image formats as well.

In this tutorial, we learnt to convert PowerPoint to JPG in C# by performing simple steps and using a few API calls. If you are interested in converting presentations to HTML, refer to the article on how to create PowerPoint slides in HTML using C#.

 English