BufferedImage img = removeBackgroud(file);//去除重影
//bufferedimage 转换成 inputstream
ByteArrayOutputStream bs = new ByteArrayOutputStream();
ImageOutputStream imOut = ImageIO.createImageOutputStream(bs);
ImageIO.write(img, "jpg", imOut);
InputStream inputStream = new ByteArrayInputStream(bs.toByteArray());
OutputStream outStream = new FileOutputStream("/data/sata/share_sata/AmazonCrawl/amazonWeb/captcha1.jpg");
IOUtils.copy(inputStream, outStream);
inputStream.close();
outStream.close();