Fix for images in Jython

Jython does not convert Pythons StringIO objects automatically to a Java InputStream. Thus the _read_image Method failed to read the image.