Crop extra width from memory alignment padding
The ImageReader can allocate wider memory to add padding bytes to each row for alignment purposes. When taking all the bytes from the buffer using copyPixelsFromBuffer, these padding bytes are also included. To exclude the padding,create a final Bitmap by cropping the temporary one to the correct dimensions. Bug: 438072503 Flag: EXEMPT bugfix Test: Pull the captured snapshot from the device and verify that the snapshot image does not contain any black bars on the right side. Change-Id: Iff9833565c470537f3af0d0f3b87ae522169c370
Loading
Please register or sign in to comment