I have observed the issue shared by you and request you to please provide the Operating system and Java details on your end along with Aspose.Slides version used. If you are using older version then please try using latest Aspose.Slides for Java 19.7 on your end.
see this file → hs_err_pid2849.log.zip
operation system and java details this file have record.
test in Aspose.Slides Java 19.6
Aspose.Slides Java 19.7 License has expired, Unable to test
$java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-2-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)
Thank you for sharing the feedback. We have created an issue with ID SLIDESJAVA-37728 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.
public class Main {
public static float mThumbnailScale = 2;
public static String mOutFormat = “jpg”;
public static float mJpegQuality = .8f;
public static String outPath = “/data/temp/3/”;
public static void main(String[] args) {
URL mainClassURL = Main.class.getProtectionDomain().getCodeSource().getLocation();
String current = "";
current = "/" + FilenameUtils.getPath(mainClassURL.getPath());
System.out.printf(current);
if (!Utils.setLicense(current + "license.xml")) {
System.out.printf("许可无效了!");
return;
}
Presentation pres = new Presentation("/data/temp/ppt/3.ppt");
System.out.printf("load end!\n");
int count = 0;
int page_count = pres.getSlides().size();
System.out.printf("total:%d pages\n", page_count);
for (ISlide sld : pres.getSlides()) {
System.out.printf("proc->%d page\n", count);
BufferedImage image;
System.out.printf("run1 \n");
try {
image = sld.getThumbnail(mThumbnailScale, mThumbnailScale);
System.out.printf("run2 h:%d w:%d\n", image.getHeight(), image.getWidth());
} catch (Exception e) {
System.out.printf(e.toString());
}
++count;
if (count >= page_count) {
break;
}
}
}
I have observed your comments and like to inform that i have tried values shared by you but still unable to observe issue. Can you please try to use Aspose.Slides latest version 19.7 on your end and share feedback with us if there is still an issue.