Hi,
I’m trying to render slide thumbnails in Python. I’m getting an image, but it’s not rendering correctly. Is is a matter of the scale ?
Here’s the test presentation : https://k4f4w9c2.stackpathcdn.com/wp-content/uploads/01_big_files_kim7/2020_best_ppt/Abstract%20Ink%20Drop%20PowerPoint%20Templates.pptx
Here’s the Aspose rendering of the first slide : Screenshot 2020-10-09 at 10.42.03.jpg (628.0 KB)
Here’s how it should look like : Screenshot 2020-10-09 at 10.42.59.jpg (629.0 KB)
Here’s how I create the thumbnail :
pres = asposePresentation(file_location)
slides = pres.getSlides()
# CALCULATE THUMBNAILS SCALE
pres_width = pres.getSlideSize().getSize().getWidth()
pres_height = pres.getSlideSize().getSize().getHeight()
desired_x = 1200
desired_y = (desired_x*pres_height)/pres_width
scale_x = (1.0 / pres_width) * desired_x
scale_y = (1.0 / pres_height) * desired_y
image = slide.getThumbnail(scale_x, scale_y)
imageIO.write(image, javaString("jpg"), javaFile(slide_location))
Am I doing something wrong ? I’m surprise because manipulating the slides work on that system witout an issue (if I extract the slide and move it to another presentation, it looks fine).
I’m running on Docker with this Java11-Python3 image : Docker
Thanks