public void byte2image(byte[] data,String path){
if(data.length<3||path.equals("")) return;
try{
FileImageOutputStream imageOutput = new FileImageOutputStream(new File(path));
imageOutput.write(data, 0, data.length);
imageOutput.close();
log.info("图片转换成功: " + path);
} catch(Exception ex) {
log.error("图片转换异常: " + ex);
}
}
byte数组转图片
最新推荐文章于 2024-08-03 08:39:25 发布