Free Support Forum -

getThumbnails for a limited set of slides returns thumbnails for all slides

I am evaluating Apsose.Slides for Java (version 20.8) as a possible replacement for using Apache POI and am running into a bug trying to generate thumbnails from the slides. If I use Presentation.getThumbnails(INotesCommentsLayoutingOptions notesCommentsLayouting,
int[] slides,
float scaleX,
float scaleY)
in order to create thumbnails for part of a presentation, it returns an array containing a thumbnail for ALL slides in the presentation, not just the ones in the slides array. I also noticed that it takes approximately the same time to convert a single slide using ISlide.getThumbnail(…) as it does to convert all slides in the presentation to thumbnails. Note: if you call ISlide.getThumbnail() with no parameters it takes significantly less time than if you try and scale the image.

Test Code to reproduce:
public void slide2ImagePartial() throws Exception {
InputStream isPPT1 = getClass().getResourceAsStream("/test6.pptx");
Presentation ppt1 = new Presentation(isPPT1);
int half = ppt1.getSlides().size()/2;
int[] slides = new int[half];
for(int i=0;i<half;i++) {
long start = System.currentTimeMillis();
BufferedImage[] thumbnails = ppt1.getThumbnails(null,slides,0.25f,.25f);
long end = System.currentTimeMillis();
System.out.println(“Converted half of the presentation to thumbnails in " + (end-start) + " ms”);
assertEquals(“Wrong number of thumbnails generated”, half, thumbnails.length);



I have reproduced the issue on my end and a ticket with ID SLIDESJAVA-38315 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.