My goal is to save an image to the disk (actually get an InputStream) to an image that represents exactly what the user sees in MS Word. It appears that this is possible if the image is just a shape and is visited via visitShape(Shape shape). In this case, I can do the following:
ImageData imageData = shape.getImageData();
imageData.getCropBottom();
imageData.getCropTop();
imageData.getCropLeft();
imageData.getCropRight();
That allows me to manipulate the original image such that I can save only the portion of the image that the user can see in MS Word (without changing the crop).
There are another class of images that are visited via visitDrawingMLStart(DrawingML drawing). In this case, I can do the following:
DrawingMLImageData imageData = drawing.getImageData();
Unfortunately, the DrawingMLImageData type does not include any crop methods such that I can determine where the cropped area of the image is. Therefore, it is not possible for me to get an InputStream to the bytes that represent the cropped region.
Thank you for any assistance!