I am trying to convert image object to bitmap, but it return null.
image = reader.acquireLatestImage(); ByteBuffer buffer = image.ge
You haven't copied bytes.You checked capacity but not copied bytes.
ByteBuffer buffer = image.getPlanes()[0].getBuffer(); byte[] bytes = new byte[buffer.remaining()]; buffer.get(bytes); Bitmap myBitmap = BitmapFactory.decodeByteArray(bytes,0,bytes.length,null);