Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 332076ce authored by wilsonshih's avatar wilsonshih
Browse files

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
parent 2c325801
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment