代码如下
public void analyze(@NonNull ImageProxy image) {
//ByteBuffer buffer = image.getImage().getPlanes()[0].getBuffer();
Bitmap bitmapBuffer = Bitmap.createBitmap(image.getWidth(), image.getHeight(), Bitmap.Config.ARGB_8888);
bitmapBuffer.copyPixelsFromBuffer(image.getPlanes()[0].getBuffer());
}
正着拍的,图像显示如下
请问如何才能把它转正?