Hi,
When inserting an image to a PPTX presentation, we are getting the following error - for some images:
com.aspose.slides.pptx.PptxException$PptxReadException: Couldn’t load image from stream.
Please see the 2 attached images - both jpg files. All works OK when inserting image.jpg; and we get an error with imageError.jpg.
This is the code snippet I use to replicate the issue:
PresentationEx pres = new PresentationEx( “C:/insertImageTest.pptx”);
FileInputStream imageStream = new FileInputStream( “c:/imageError.jpg”);
ImageEx imageEx = pres.getImages().addImage( imageStream );
ShapesEx shapesEx = pres.getSlides().get(0).getShapes();
Integer index = shapesEx.addPictureFrame( ShapeTypeEx.RECTANGLE, 50, 50, 50, 50, imageEx );
pres.save( “c:/insertImageTestOut.pptx”, SaveFormat.PPTX );
We use Aspose Slides version 2.9.6.
Please let us know if this can be fixed or if there is any other way to insert the imageError.jpg into a presentation without an error.
Thanks,
Natasa
Hi Natasa,
The issues you have found earlier (filed as SLIDESJAVA-33896) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.