We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

An abnormal result is recognized for a picture box with no content

Whether the result of recognizing the picture box with empty shape in PPT can be null or transparent picture, rather than an abnormal picture.
The following are some source data and identification results:Dingtalk_20210714190545.jpg (152.1 KB)
Dingtalk_20210714190659.jpg (59.3 KB)
EmptyPictureFrame.zip (34.9 KB)

@DRzeng88

Can you please explain the abnormal behaviour you are having along with source file, used code, generated and desired output. From your image and presentation, it is not evident what behaviour you are getting using API and what you are expecting.

I hope that when there is no content in the picture frame, the screenshot will be transparent, instead of the white “No Image” picture in my screenshot.And below is the method call I used.

ISlideCollection iSlides = presentation.getSlides();
		for (int i = 0; i < iSlides.size(); i++) {
			ISlide slide = iSlides.get_Item(i);
			IShapeCollection shapes = slide.getShapes();
			for (int j = 0; j < shapes.size(); j++) {
				IShape shape = shapes.get_Item(j);
				if (shape instanceof PictureFrame){
					PictureFrame frame = (PictureFrame) shape;
					BufferedImage thumbnail = frame.getThumbnail();
				}
			}
		}

@DRzeng88,
When I open the “EmptyPictureFrame.pptx” file, I see the message: “PowerPoint couldn’t read some content in EmptyPictureFrame.pptx and removed it.” PowerPointMessage.jpg (17.9 KB)
It looks like the presentation is corrupted. In this case, the correct conversion to an image cannot be guaranteed. If the presentation was created using the Slides API, please share that code.