Unsupported image format


#1

Hi,



i have a word template with an image (see attachment).

Here is the sample code:



Document doc = new Document(@“C:\Test.dot”);

using (MemoryStream ms = new MemoryStream())

{

    doc.Save(ms,

SaveFormat.FormatAsposePdf);

ms.Close();

}



It throws this exception in doc.Save():



Unsupported image format.

at ?.?.?(? ?)

at ?.?.get_?()

at ?.?.?(? ?)

at ?.?.?(? ?, Boolean ?, Int32 ?, Int32 ?)

at ?.?.?(InlineShape ?)

at ?.?.VisitInlineShape(InlineShape shape)

at Aspose.Word.InlineShape.Accept(DocumentVisitor visitor)

at Aspose.Word.CompositeNode.?(DocumentVisitor ?)

at Aspose.Word.Paragraph.Accept(DocumentVisitor visitor)

at Aspose.Word.CompositeNode.?(DocumentVisitor ?)

at Aspose.Word.Body.Accept(DocumentVisitor visitor)

at ?.?.?(Section ?)

at ?.?.?(Document ?, Stream ?, String ?)

at Aspose.Word.Document.?(Stream ?, String ?, SaveFormat ?)

at Aspose.Word.Document.Save(Stream stream, SaveFormat fileFormat)



Robik


#2

Hi Robik,

Thank you for the report. We've logged it so we'll try to fix it asap.


#3

The image was in DIB format. Now supported in Aspose.Word 3.3.1.