Hello
Hi Shubhi,
try {
ISlide slide = ppt.getSlides().get_Item(0);
for (IShape shape : slide.getShapes())
if (shape instanceof IChart) {
BufferedImage image = shape.getThumbnail(ShapeThumbnailBounds.Appearance, 1.0f, 1.0f);
// Converting to non-transparent image with white background
// for Bmp and Jpeg formats
BufferedImage convertedImg = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_INT_RGB);
convertedImg.getGraphics().drawImage(image, 0, 0, Color.WHITE, null);
File outputBmpImage = new File(path + “chart_” + UUID.randomUUID() + “.bmp”);
ImageIO.write(convertedImg, “bmp”, outputBmpImage);
File outputJpegImage = new File(path + “chart_” + UUID.randomUUID() + “.jpeg”);
ImageIO.write(convertedImg, “jpeg”, outputJpegImage);
}
} catch (IOException ex) {
ex.printStackTrace();
}
I hope this will be helpful. Please share if I may help you further in this regard.
Best Regards,
The issues you have found earlier (filed as SLIDESJAVA-35120) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.