&& imgPt.getSpPr()!=null
&& imgPt.getSpPr().getBlipFill()!=null
&& imgPt.getSpPr().getBlipFill().getBlip()!=null) {
// Get the relId
CTBlip blip = imgPt.getSpPr().getBlipFill().getBlip();
if (blip.getEmbed()!=null) {
String relId = blip.getEmbed();
//Relationship r = diagramDataPart.getRelationshipsPart().getRelationshipByID(relId);
BinaryPartAbstractImage bpai = (BinaryPartAbstractImage)diagramDataPart.getRelationshipsPart().getPart(relId);
// Add it
Image image = factory.createSmartArtDataHierarchyImagesImage();
image.setContentType(bpai.getContentType());
image.setId(imgPt.getModelId());
image.setValue(bpai.getBytes());
images.getImage().add(image);
// reference
org.opendope.SmartArt.dataHierarchy.ImageRef imageRef = factory.createImageRef();
imageRef.setContentRef(imgPt.getModelId());
// Other attributes
if (imgPt.getPrSet()!=null ) {
CTElemPropSet props = imgPt.getPrSet();
if (props.getCustLinFactNeighborX()!=null) {
imageRef.setCustLinFactNeighborX(props.getCustLinFactNeighborX());
}
if (props.getCustLinFactNeighborY()!=null) {
imageRef.setCustLinFactNeighborY(props.getCustLinFactNeighborY());
}
if (props.getCustScaleX()!=null) {
imageRef.setCustScaleX(props.getCustScaleX());
}
if (props.getCustScaleY()!=null) {
imageRef.setCustScaleY(props.getCustScaleY());
}
}
thisListItem.setImageRef(imageRef);
} else if (blip.getLink()!=null) {
// TODO
// -check a linked image actually works in SmartArt.
// -our export format could be extended to support linked images
// -and/or we could fetch the image and embed it