How to Extract Entire Background of Presentation Slide as Image and Save It in Python?

How to save all of background including its properties color theme as a image jpeg. (In python please)

@jwala.vaishnavi2412,
Thank you for posting the question.

The slide background can consist of many elements. In addition to the image that was set as the background of a slide, the final background can be influenced by the theme of the presentation and the shapes located on the master slide and layout slide.

Aspose.Slides does not provide a simple method to extract the slide background. Please try using the following workaround:

import aspose.slides as slides
from aspose.pydrawing.imaging import ImageFormat

slide_index = 0
scale = 1

with slides.Presentation("sample.pptx") as presentation:
    slide_size = presentation.slide_size.size

    slide_to_be_copied = presentation.slides[slide_index]

    with slides.Presentation() as temp_presentation:
        temp_presentation.slide_size.set_size(
            slide_size.width, slide_size.height, 
            slides.SlideSizeScaleType.DO_NOT_SCALE)

        slide = temp_presentation.slides.add_clone(slide_to_be_copied)

        # Remove all shapes and leave only the slide background.
        slide.shapes.clear()

        with slide.get_thumbnail(scale, scale) as background:
            background.save("output.png", ImageFormat.png)

More examples: