ImageReader reader = (ImageReader) iterator.next();
ImageInputStream iis = ImageIO.createImageInputStream(is);
reader.setInput(iis, true);
BufferedImage image = reader.read(0);
reader.dispose();
iis.close();
return image;
}
public static boolean canWriteUncompressed(String format) {