There are a 1000 answers on Stack Overflow, but all of them use a matrix transformation and looking at the code a W
xH
image is created which has the dimensions of the original W
xH
. Just two examples: Portrait to Landscape image rotation and Controlling the camera to take pictures in portrait doesn't rotate the final images
Some solutions even resize and scale to compensate.
I may misunderstand something, but what I need is a simple rotation. So say I have a 256
x 144
image (landscape, Media.Image or Bitmap) and I need to have another one which is 144
x 256
portrait, with the same content but rotated. I'd want to display the resulting Bitmap in an Android ImageView widget, so I suspect (but I'm not 100% sure) that simple meta-data manipulation (like JPEG EXIF rotation info, but for Bitmaps if such exists) might be out of the question, although that would be an efficient way.
How to do that, preferably in an efficient manner?