There might be situations where you need to convert your PowerPoint files to images. For example, to generate thumbnails or to add images of the slides to a document. For such cases, converting PowerPoint files to PNG format will prove to be helpful as PNG is a popular raster graphics format that supports lossless compression. To that end, this article will teach you how to convert your PowerPoint PPT to PNG images in C++.
- C++ PowerPoint PPT to PNG Converter - Free Download
- How to Convert PowerPoint PPT to PNG
- Converting PowerPoint PPTX to PNG in C++
- Free C++ PowerPoint to PNG Converter
- Online PowerPoint to PNG Converter
C++ PPT to PNG Converter
Aspose.Slides for C++ is a robust and feature-rich API that allows you to create, read, and update PowerPoint files without requiring Microsoft PowerPoint to be installed. Furthermore, the API supports converting PowerPoint presentations to PNG images. You can either install the API through NuGet or download it directly from the Downloads section.
PM> Install-Package Aspose.Slides.Cpp
PowerPoint PPT to PNG in C++
Aspose.Slides for C++ provides the simplest way of converting slides in PowerPoint PPT to PNG images. The following are the steps that you need to perform for PPT to PNG conversion in your C++ applications.
- Load the PPT/PPTX presentation from disk.
- Set dimensions of output PNG image.
- Convert each slide in PPT to a PNG image.
- Save PNG image file on disk.
Let’s now transform these steps into the code to see how to convert a PPTX file to PNG in C++.
C++ Code to Convert PPT to PNG
The following are the steps to convert PowerPoint PPT to PNG in C++.
- Load the PowerPoint file using the Presentation class.
- Set the desired dimensions for the images to be generated.
- Loop through the slides of the presentation.
- Generate the image of each slide using the ISlide->GetThumbnail(float scaleX, float scaleY) method.
- Save the PNG image using the Bitmap->Save(const String & filename, const Imaging::ImageFormatPtr & format) method.
The following sample code shows how to convert PowerPoint slides to PNG images in C++.
Free C++ PowerPoint to PNG Converter {#Free-C++-PowerPoint-to-PNG-Converter}
Get a free temporary license and convert PowerPoint presentations to PNG images without any limitations.
Online PowerPoint to PNG Converter
We also offer a free web-based PowerPoint to PNG converter that you can use to convert your PPT presentations to PNG images online. The converter is completely free and you do not even need to create an account.
Conclusion
In this article, you have learned how to convert PowerPoint files to PNG images using C++. We used the Aspose.Slides for C++ API to achieve this. It is a powerful API that provides a bunch of additional features for working with PowerPoint files. You can explore the API in detail by visiting the official documentation. In case of any queries, please feel free to reach us at our free support forum.