【发布时间】:2014-01-19 16:56:07
【问题描述】:
如何将 Base64 编码的图像写入文件?
我已使用 Base64 将图像编码为字符串。 首先,我读取文件,然后将其转换为字节数组,然后应用 Base64 编码将图像转换为字符串。
现在我的问题是如何解码。
byte dearr[] = Base64.decodeBase64(crntImage);
File outF = new File("c:/decode/abc.bmp");
BufferedImage img02 = ImageIO.write(img02, "bmp", outF);
变量crntImage 包含图像的字符串表示形式。
【问题讨论】:
标签: java image base64 decode encode