How to Get PPT Design Theme as a Thumbnail Image Using Aspose.Slides for C++?

Hi,
I wanted to access a ppt design theme used in my test PPT as thumbnail(bitmap). I am using the below classes as per the ASPOSE documentation.

int32_t numberOfBackgroundFills = pres->get_MasterTheme()->get_FormatScheme()->get_BackgroundFillStyles()->get_Count();

There are 3 backgroundfillStyles retrieved . But i want is to save this background as image. Please help on how i can do it.

Attaching the scrrenshot of the PPT used for testing for better understanding.

PPTDesign.PNG.jpg (161.4 KB)

Thanks

@asgarg,
Thank you for posting the inquiry.

Unfortunately, I didn’t find a way to get the theme’s background as an image. I’ve added a ticket with ID SLIDESCPP-3434 to our issue tracking system. Our development team will consider implementing such a feature. You will be notified when the issue is resolved.

@asgarg,
Our development team investigated the issue. Unfortunately, there is no way to get a theme’s background directly. You can do this by cloning a slide, clearing all of its shapes, and getting a thumbnail. The following code example shows you how to do this:

using namespace System;
using namespace System::Drawing::Imaging;
using namespace Aspose::Slides;

auto pres = MakeObject<Presentation>(u"Presentation.pptx");
auto slide = pres->get_Slides()->AddClone(pres->get_Slides()->idx_get(0));

slide->get_Shapes()->Clear();

auto bmp = slide->GetThumbnail(System::Drawing::Size(1280, 720));
pres->get_Slides()->Remove(slide);

bmp->Save(u"background.png", ImageFormat::get_Png());

Documents: Clone Slides, Convert Slide
API Reference: AddClone Method | GetThumbnail Method