Why are you making duplicate posts???
Hi Erel.
It was not my intent to duplicate the post. When I downloaded the camera2 example and made my first test I thought that was a problem of my camera so I opened the post of how to rotate a bitmap.
After several test with the camera2's code I thought that it was posible that there were a call to the apis, inside the code, to set the image to vertical because the image is not rotate if I take the photo with the phone in horizontal position.
I'm sorry for the inconveniences and apologies.