}
private Paint createTexturePaint(CTBlipFillProperties blipFill, Graphics2D graphics,
PackagePart parentPart){
Paint paint = null;
CTBlip blip = blipFill.getBlip();
String blipId = blip.getEmbed();
PackageRelationship rel = parentPart.getRelationship(blipId);
if (rel != null) {
XSLFImageRenderer renderer = null;
if (graphics != null)
renderer = (XSLFImageRenderer) graphics.getRenderingHint(XSLFRenderingHint.IMAGE_RENDERER);
if (renderer == null) renderer = new XSLFImageRenderer();
try {
BufferedImage img = renderer.readImage(parentPart.getRelatedPart(rel));
if (blip.sizeOfAlphaModFixArray() > 0) {
float alpha = blip.getAlphaModFixArray(0).getAmt() / 100000.f;
AlphaComposite ac = AlphaComposite.getInstance(
AlphaComposite.SRC_OVER, alpha);
if (graphics != null) graphics.setComposite(ac);
}