Thanks for your reply.
We are still facing a problem while generating a document with the PNG images. Could somebody guide us what is wrong here? Also looking into official site, it says that the png image format is supported.
Following is the code:
String filename = “image.png”;
NodeCollection shapes = document.getChildNodes(NodeType.SHAPE, true);
for (Shape shape : shapes){
if (shape.hasImage()){
InputStream is = new FileInputStream(new File(filename)));
shape.getImageData().setImage(is);
}
}
LOG:
Caused by: java.lang.IllegalArgumentException: The image format is not supported. FileFormat=UNKNOWN
at asposewobfuscated.zzMS.zzT(Unknown Source)
at asposewobfuscated.zzMS.(Unknown Source)
at com.aspose.words.zzZTH.zzZD(Unknown Source)
at com.aspose.words.zzZTH.zzC(Unknown Source)
at com.aspose.words.zzZTH.setImageBytes(Unknown Source)
at com.aspose.words.zzZTH.zz4(Unknown Source)
at com.aspose.words.ImageData.zz4(Unknown Source)
at com.aspose.words.ImageData.setImage(Unknown Source)
at com.aspose.words.ImageData$setImage.call(Unknown Source)
Thanks in Advance.