Use Custom Image in Visio Shape

Need a help!.

I have the dynamic image base64 strings and need to add those images into the visio diagram without vss.


We are checking it and will get back to you shortly.

Please refer to the following documents:

Please refer to the following code snippet:
string base64text = “”;
byte[] binData = Convert.FromBase64String(base64text);
MemoryStream stream;
using (stream = new MemoryStream(binData))
double pinX = 1;
double pinY = 1;
double width = 5;
double hieght = 5;
id = vsdDiagram.Pages[0].AddShape(pinX, pinY, width, hieght, stream);

1 Like

Thanks for your reply. Can I have the same code in java?

Yes,Please change the input parameter MemoryStream to inputstream.

Hi ,
Thanks for your reply , now its working…But still i have some challenges,

  1. Image is coming inside the box and should come as transparent
  2. I have multiple link between same pair or nodes ,but its overlapped
  3. Text is overlapping with image

How can I fix these issues?

Request your kind help…

Screenshot from 2022-12-14 17-40-12.png (179.3 KB)


Please share the complete sample code snippet for our reference along with the sample files you used. We will further proceed to assist you accordingly.