Code
public static byte[] imageToByte(BufferedImage bi,String format) throws IOException
{
ByteArrayOutputStream baos=new ByteArrayOutputStream();
ImageIO.write(bi, format, baos);
return baos.toByteArray();
}
//exp:
byte[] b=imageToByte(bi,"jpeg");
posted @
2009-06-16 07:44
死循环
阅读(
207)
评论()
编辑
收藏
举报