Convert POTX to JPEG in C++

Convert POTX to JPEG using Aspose.Slides for C++ without Microsoft PowerPoint.

Convert POTX to JPEG Using C++

To convert POTX to JPEG, use Aspose.Slides for C++ , a presentation processing API for C++ applications. You can download the latest version directly from NuGet , search for Aspose.Slides.Cpp, and install it. You may also use the following command from the Package Manager Console.

Command

PM> Install-Package Aspose.Slides.Cpp

POTX to JPEG C++ Conversion Source Code

auto presentation = MakeObject<Presentation>(u"presentation.potx");
auto slide = presentation->get_Slide(0);

auto desiredSize = Size(1200, 800);
auto image = slide->GetImage(desiredSize);
image->Save(u"slide.jpeg", ImageFormat::Jpeg);
image->Dispose();

presentation->Dispose();

How to Convert POTX to JPEG via C++

C++ developers can convert a POTX file to JPEG in just a few lines of code.

  1. Create a Presentation instance from the source POTX file.
  2. Get the first slide from the presentation.
  3. Set the output image size.
  4. Render the slide to an image.
  5. Save the image as a JPEG file.

System Requirements

Before running the C++ conversion example code, make sure that you have the following prerequisites.

  • Microsoft Windows, Linux, macOS, or another compatible OS with the supported C++ runtime.
  • Aspose.Slides for C++ library referenced in your project.

Built with Aspose.Slides

Convert POTX to JPEG Online

The free Aspose.Slides Conversion app is built with Aspose.Slides for C++, the same API as the code above. Open it and see what the API can do with your own POTX files.

  • Runs in your browser, nothing to install.
  • See how Aspose.Slides converts files before you write code.
  • Upload POTX files and save them as JPEG.
  • Download the result or convert more files.