The producer output buffer format 0x1 doesn't match the ImageReader's configured buffer format 0x4

出错语句: mImageReader = ImageReader.newInstance(width, height, ImageFormat.RGB_565, 2);

错误描述:buffer format 0x1 doesn't match the ImageReader's configured buffer format 0x4

出错原因:创建 ImageReader 时 ImageFormat 设置不对

解决方法:直接把 ImageFormat 改成 0x1
mImageReader = ImageReader.newInstance(width, height, 0x1, 2);

你可能感兴趣的:(The producer output buffer format 0x1 doesn't match the ImageReader's configured buffer format 0x4)