private byte[] getPhoto()
throws Exception {
final String ICON_EXT = "png";
String file ="D:\\workspace\\OSL\\trunk\\learning-tool\\Web\\public_html\\images\\chart.png";
BufferedImage orgImage = ImageIO.read(new FileInputStream(file));
ByteArrayOutputStream o = new ByteArrayOutputStream();
ImageIO.write(orgImage, ICON_EXT, o);
return o.toByteArray();
}
Image to Buffer
最新推荐文章于 2025-09-09 09:10:31 发布
