你好,我想保存一个BufferedImage中原始字节 我这样做的时刻保存的BufferedImage中原始字节
InputStream in = new ByteArrayInputStream(fileData);
BufferedImage image = javax.imageio.ImageIO.read(in);
BufferedImage imageModifier = ResizeImage.resize(image, 10, 10);
,但知道我要救我的文件,所以我不(知道如何转换为做到这一点
FileOutputStream fileOutStream = new FileOutputStream(fileToCreate);
fileOutStream.write(fileData);
感谢
的byte [] FILEDATA = newfile.getFileData (); 当我有我的fileData我转换为BufferedImage调整我的图像的大小,当我rezie我的形象我写入FileOutputStream与文件夹 – Nander 2010-03-31 17:59:43
好了,然后阅读ImageIO,你需要什么。 你也不需要使用newFile.getFileData()。只要做'InputStream in = new FileInputStream(new File());' –
Pyrolistical
2010-03-31 18:13:04