We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Insert Icon .ico File with Multiple BMP & PNG Images of Different Sizes in Word Document using C# .NET

Hello,

We are experiencing problems when inserting icon files (.ico) as image since we’ve upgraded our Aspose Words .NET version (16.1.0.0) to version 20.7.0.0.

The version we were originally using generated the largest possible image from the icon file. The new version generates the smallest image. Any idea’s?

Thanks.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.InsertImage(“pf-logo-red.ico”);

doc.Save("…");

insertimage.zip (78.3 KB)

@Pluriform_Software,

We have logged this problem in our issue tracking system with ID WORDSNET-21078. We will further look into the details of this problem and will keep you updated on the status of linked issue. We apologize for your inconvenience.

Hi awais.hafeez,

Thanks for your reply. Can you give us any indication in the status of this issue? Our customers are currently waiting for this issue to be fixed before they update.

Or if you could provide a preliminary workaround, that would be great!

Thanks,

Koen

@Pluriform_Software,

We have completed the analysis of WORDSNET-21078. But, there are no timelines and workarounds available at the moment. We will keep you posted here on any further updates (ETA or workaround) and let you know when this issue will get resolved in future. We apologize for your inconvenience.

We have noticed that the problem only occurs if the icon is directly used by the document builder, via
builder.InsertImage(“pf-logo-red.ico”);
or
builder.InsertImage(memorystream); //memorystream contains 'pf-logo-red.ico'

we’re using a workaround that fixes the issue:
builder.InsertImage(Image.FromFile(“pf-logo-red.ico”));
or
builder.InsertImage(Image.FromStream(memorystream)); //memorystream contains 'pf-logo-red.ico'.

@Pluriform_Software,

We have logged these details in our issue tracking system and will keep you posted here on any further updates.