for (XSLFSlide slide : ppt.getSlides()){
for (XSLFShape shape : slide.getShapes()){
assertNotNull(shape);
if (shape instanceof XSLFPictureShape) {
XSLFPictureShape picture = (XSLFPictureShape)shape;
if (picture.isExternalLinkedPicture()) {
externalPictures++;
assertNotNull(picture.getPictureLink());
} else {
internalPictures++;
XSLFPictureData data = picture.getPictureData();
assertNotNull(data);
assertNotNull(data.getFileName());
}
}
}