【发布时间】:2014-12-07 17:42:32
【问题描述】:
当我使用下面的代码将字节数组保存到 gif 时,gif 文件是模糊的。
但如果我将字节数组保存为 png 或 jpg 就一切正常。有谁知道问题出在哪里?
public writeToFile(byte[] array) {
try {
String path = "...";
FileOutputStream stream = new FileOutputStream(path);
stream.write(array);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
【问题讨论】: