// Insert Image resource to package
DrawImageElement imageElement = imageContainer.newDrawImageElement();
InputStream is = image.getImageInputStream();
String internalPath = image.getInternalPath();
String mediaType = OdfFileEntry.getMediaTypeString(internalPath);
OdfSchemaDocument mOdfSchemaDoc = (OdfSchemaDocument) ownerDom.getDocument();
String packagePath = Image.getPackagePath(mOdfSchemaDoc,internalPath);
mOdfSchemaDoc.getPackage().insert(is, packagePath, mediaType);
packagePath = packagePath.replaceFirst(ownerDom.getDocument().getDocumentPath(), "");
Image.configureInsertedImage((OdfSchemaDocument) ownerDom.getDocument(), imageElement,packagePath, false);
// get image object
mImage = Image.getInstanceof(imageElement);
mImage.getStyleHandler().setAchorType(AnchorType.AS_CHARACTER);