【发布时间】:2014-08-04 20:21:15
【问题描述】:
我想要这样得到的字节数组中的像素值:
File file = new File(pngfilepathfromSDCARD);
byte[] array = new byte[file.length()];
BufferedInputStream buf = new BufferedInputStream(new FileInputStream(file));
buf.read(array,0,array.length);
buf.close();
原始 png 文件大小为 320*240 = 76800 像素,而数组长度为 14792。 我无法理解数组编码的格式,我想使用该数组中的 RGB 值进行进一步处理。
【问题讨论】:
标签: android image android-ndk