Hi there,
How can I convert the Shape in the attached document to a PNG and get the bytes for it?
Shape.getImageData().getImageBytes() returns null.
Hi there,
Hi Alex,
Document doc = new Document(“C:\Temp\testShape.docx”);int i = 0;
for (Shape shape : (Iterable<Shape>) doc.getChildNodes(NodeType.SHAPE, true)) {
ShapeRenderer r = shape.getShapeRenderer();ImageSaveOptions imageOptions <font color="BLUE">=</font> <font color="RED"><b>new</b></font> ImageSaveOptions<font color="BLUE"><b>(</b></font>SaveFormat<font color="BLUE"><b>.</b></font>PNG<font color="BLUE"><b>)</b></font><font color="BLUE"><b>;</b></font> r<font color="BLUE"><b>.</b></font>save<font color="BLUE"><b>(</b></font><font color="PURPLE">"C:\\temp\\img"</font> <font color="BLUE">+</font> i <font color="BLUE">+</font> <font color="PURPLE">".png"</font><font color="BLUE"><b>,</b></font> imageOptions<font color="BLUE"><b>)</b></font><font color="BLUE"><b>;</b></font> i<font color="BLUE"><font color="BLUE">+</font><font color="BLUE">+</font></font><font color="BLUE"><b>;</b></font>
}