//Process image
if (doc instanceof HWPFDocument
&& ((HWPFDocument) doc).getPicturesTable().hasPicture(run)) {
Picture picture = doc.getPicturesTable().extractPicture(run,
true);
Inline inline;
try {
BinaryPartAbstractImage imagePart = BinaryPartAbstractImage
.createImagePart(wordMLPackage, picture.getContent());
long cx = UnitsOfMeasurement
.twipToEMU(Math.round((double) imagePart
.getImageInfo().getSize().getWidthMpt()
* ((double) picture
.getHorizontalScalingFactor() * 0.00001d))) * 2L;
long cy = UnitsOfMeasurement
.twipToEMU(Math.round((double) imagePart
.getImageInfo().getSize().getHeightMpt()
* ((double) picture
.getVerticalScalingFactor() * 0.00001d))) * 2L;
inline = imagePart.createImageInline(null, "", ID1++,
ID2++, cx, cy, false);