Hi, When I try to save an image detected through a imageplacement to stream
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) {
imagePlacement.getImage().save(outputStream, ImageType.getPng());
return outputStream.toByteArray();
}
Getting the following Exception?
Exception: java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 4
at com.aspose.pdf.internal.l8t.lf.lI(Unknown Source)
at com.aspose.pdf.internal.l8t.lf.lI(Unknown Source)
at com.aspose.pdf.internal.l6l.lI.lI(Unknown Source)
at com.aspose.pdf.internal.l6l.lI.lI(Unknown Source)
at com.aspose.pdf.internal.l3f.lu.lI(Unknown Source)
at com.aspose.pdf.XImage.lI(Unknown Source)
at com.aspose.pdf.XImage.saveInternal(Unknown Source)
at com.aspose.pdf.XImage.saveInternal(Unknown Source)
at com.aspose.pdf.XImage.save(Unknown Source)