I have a PowerPoint that contains an image with a transparent background. I want to use the python-pptx package to extract it, but it doesn't include the transparent background.
Basically I have an image
variable which is a python-pptx PICTURE object.
file = "test.png"
image_bytes = image.image.blob
image_stream = BytesIO(image_bytes)
im = Image.open(image_stream)
im.save(file, format="PNG")
But instead of an image with a transparent background I get a black background. Any help?