Free Support Forum - aspose.com

Diagram Inserting Png Issue

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();
        lic.SetLicense("Conholdate.Total.NET.lic");

        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)Diagrams.zip (409.9 KB)

@chub

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.

@chub

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.