
Convert PPT to PNG using C#
MS PowerPoint provides a rich set of multimedia features for professional presentations. PPT/PPTX files are easy to store and convert to other formats. Often you need to turn slides into image files such as PNG. You can achieve this PPT to PNG Image conversion with a C# PowerPoint library. Let’s learn how to convert PPT to PNG using C# programmatically.
We will cover:
- C# PowerPoint to Image Rendering Library - Installation
- Convert PPT to PNG Image using C#
- PPTX to PNG with Custom Size in C#
- PowerPoint to PNG with Custom Dimension in C#
C# PowerPoint to Image Rendering Library - Installation
The installation process is developer‑friendly. You can either download this .NET PowerPoint library or install it via NuGet:
Install-Package Aspose.Slides.NET
Convert PPT to PNG Image using C#
This library offers methods to manipulate, create, and convert PPT/PPTX files programmatically.
Follow these steps and the code snippet to convert PPT to PNG:
- Load the source PPT file by creating a
Presentationobject. - Access
Presentation.Slidesto get the slide collection. - Assign each slide to the
ISlideinterface. - Call
GetThumbnailfor each slide and useSaveto write the PNG file.
The code below converts a PPT/PPTX presentation to PNG images in C#:
Result example:

PPTX to PNG with Custom Size in C#
Here’s how to set custom dimensions for the output PNG files.
Steps:
- Create a
Presentationinstance and load the PPT file. - Define
scaleXandscaleYto set custom dimensions. - Loop through all
Slides. - Get the thumbnail with the custom size and
Saveit as PNG.
Sample code:
Output screenshot:

PowerPoint to PNG with Custom Dimension in C#
Now we’ll customize the PNG dimensions using the Size constructor.
Steps:
- Initialize a
Presentationobject and load the source PPT. - Set the desired PNG size with the
Sizeconstructor. - Iterate through all
Slides. - Use
GetThumbnailwith the custom size andSaveeach slide as PNG.
Code example:
Get a Free License
You may get a free temporary license to try the API without evaluation limitations.
Summing up
We have shown how to convert PPT PPTX to PNG image using C# programmatically and highlighted additional features of this C# PowerPoint library. Visit the documentation for more methods. Stay connected with conholdate.com for updates.
Ask a question
You can share your questions on our forum.
FAQs
Can we convert PPT to image?
Yes. Install this C# PowerPoint library to convert PPT to image formats programmatically.
How do I convert a PPT to a PNG?
Follow this link to automate PPT/PPTX to PNG conversion in a C# application.