_image = ImageIO.read(_is);
_width = _image.getWidth();
_height = _image.getHeight();
TempStream ts = new TempStream();
WriteStream os = new WriteStream(ts);
try {
ImageIO.write(_image, "jpeg", os);
} finally {
os.close();
}
/*
os = Vfs.openWrite("file:/tmp/caucho/qa/test.jpg");
try {
ImageIO.write(_image, "jpeg", os);
} finally {
os.close();
}
os = Vfs.openWrite("file:/tmp/caucho/qa/test.png");
try {
ImageIO.write(_image, "png", os);
} finally {
os.close();
}
*/
return parseImageJpeg(ts.openRead());
}