You can use instead the method:
Using java Syntax Highlighting
public static BinaryPartAbstractImage createImagePart
(
OpcPackage opcPackage,
Part sourcePart,
byte[] bytes
) throws Exception
Parsed in 0.013 seconds, using
GeSHi 1.0.8.4
but note that behind the scenes, it still creates a temp file. This is because org.apache.xmlgraphics.image.loader.ImageManager gets org.apache.xmlgraphics.image.loader.ImageInfo from a URL.
Hmmm... I wonder whether it could be fed a data URI?