Free Support Forum -

Add PNG image inside VISIO Diagram using Aspose.Diagram for .NET - inserted image is blank

I’m Trying to add png image to diagram. But I receive just image with white background.

static void Main(string[] args)
        Aspose.Diagram.License lic = new Aspose.Diagram.License();

        Diagram diagram = new Diagram("input.vsd");
        Page page0 = diagram.Pages[1];
        double pinX = 3, pinY = 3, width = 4, hieght = 4;
        using (FileStream fs = new FileStream(@"C:\Users\HYSTOU\source\repos\ConsoleApp6\ConsoleApp6\bin\Debug\tmp.png", FileMode.Open)) {
            page0.AddShape(pinX, pinY, width, hieght, fs);
        diagram.Save("InsertImageInVisio_Out.vsdx", SaveFileFormat.VSDX);

tmp.png (233.9 KB) (409.9 KB)


We have logged an issue as DIAGRAMNET-51748 in our issue tracking system for the sake of further investigation. We will look into details of the issue and keep you posted with the status of its rectification. Please be patient and spare us little time.

We are sorry for the inconvenience.


Would you kindly try using this hotfix i.e. Aspose.Diagram for .NET 20.1.1 and let us know in case issue still persists.

The issues you have found earlier (filed as DIAGRAMNET-51748) have been fixed in Aspose.Diagram for .NET 20.2.