private Image openImage(InputStream stream) {
SeekableStream s = SeekableStream.wrapInputStream(stream, true);
RenderedOp planarImage = JAI.create("stream", s);
((OpImage) planarImage.getRendering()).setTileCache(null);
Format format = ImageUtil.getFormat(stream);
Color color = ImageUtil.getColor(planarImage);
return ImageUtil.create(planarImage, format, color);
}