qiuxfeng1985
Results
2
comments of
qiuxfeng1985
原因:ImageAnalyzer 解析Y数据时出现了异常,在某些手机上,remaining() 方法返回的是字节数组的容量,而不是实际大小 ByteBuffer buffer = image.getPlanes()[0].getBuffer(); byte[] data = new byte[buffer.remaining()]; buffer.get(data); 改为如下方式 int width = image.getWidth(); int height = image.getHeight(); ByteBuffer yBuffer = image.getPlanes()[0].getBuffer(); int numPixels = (int)...
在oppo A32上验证没有问题了