嘿,我无法弄清楚这里有什么问题。
写入文件:
byte[] dim = new byte[2];
dim[0] = (byte) deImgWidth; // Input 384
dim[1] = (byte) deImgHeight; // Input 216
out.write(dim);
从文件中读取
byte[] file = new byte[(int) f.length()];
FileInputStream fs = new FileInputStream(f);
fs.read(file);
deImgWidth = ((file[0]) & 0xFF); // output 128
deImgHeight = ((file[1]) & 0xFF); // output 216
为什么我可以检索相同的 deImgHeight 值但不能检索相同的 deImgWidth 值?