public String getPhoto(String image){
String path = "D:/byz";
File file = new File(path);
if(!file.exists()){
file.mkdirs();
}
path+ ="1.jpg";
try{
File photoFile = new File (path);
FileImageOutPutStream out = new FileImageOutPutStream(photoFile);
BASE64Decoder decoder = new BASE64Decoder();
byte[] b = decoder.decodeBuffer(image);
out.write(b,0,b.length);
out.close;
return path;
}catch(Exception e){
e.printStackTrace();
}
}
读取二进制图片转为jpg格式
最新推荐文章于 2023-11-05 18:58:28 发布