How to get image in visio file?


I use aspose.diagram for java,i want to get the image in visio file.please help me,thanks. (112.1 KB)



Please use following code snippet to extract image from your Visio Diagram file:

Diagram diagram = new Diagram(dataDir + "else.vsdx");
// Enter page index i.e. 0 for first one
for (Shape shape : (Iterable<Shape>) diagram.getPages().getPage(0).getShapes())
    // Filter shapes by type Foreign
    if (shape.getType() == TypeValue.FOREIGN)
        FileOutputStream fos = new FileOutputStream(dataDir+ "ExtractAllImages" + shape.getID() + "_Out.bmp");