Spaces:
Sleeping
Sleeping
Update pptx2png.py
Browse files- pptx2png.py +2 -1
pptx2png.py
CHANGED
@@ -131,9 +131,10 @@ def render_images_with_skia(images, slide_dimensions, output_dir):
|
|
131 |
# Save the canvas to a file
|
132 |
output_path = os.path.join(output_dir, f'slide_{i+1}.png')
|
133 |
surface.makeImageSnapshot().save(output_path, skia.kPNG)
|
|
|
134 |
|
135 |
if __name__ == "__main__":
|
136 |
pptx_path = 'templates_from_gaoding/ppt/1.pptx' # Replace with your .pptx file path
|
137 |
output_dir = 'output_slides' # Directory to save the rendered images
|
138 |
images, slide_dimensions = pptx_to_images(pptx_path)
|
139 |
-
render_images_with_skia(images, slide_dimensions, output_dir)
|
|
|
131 |
# Save the canvas to a file
|
132 |
output_path = os.path.join(output_dir, f'slide_{i+1}.png')
|
133 |
surface.makeImageSnapshot().save(output_path, skia.kPNG)
|
134 |
+
return output_path
|
135 |
|
136 |
if __name__ == "__main__":
|
137 |
pptx_path = 'templates_from_gaoding/ppt/1.pptx' # Replace with your .pptx file path
|
138 |
output_dir = 'output_slides' # Directory to save the rendered images
|
139 |
images, slide_dimensions = pptx_to_images(pptx_path)
|
140 |
+
output_path = render_images_with_skia(images, slide_dimensions, output_dir)
|