I am trying to rotate a bitmap 90 degrees to change it in landscape format to portrait. Example:
[a, b, c, d]
[e, f, g, h]
[i, j, k, l]
rotated 90 degrees clockwise becomes
[i, e, a]
[J, F, b]
[K, g, s]
[L, h, d]
Using the code below (from an online example), the image rotates 90 degrees, but retains the aspect ratio of the landscape, so you get a vertically compressed image. Am I doing something wrong? Is there any other method I need to use? I also want to rotate the jpeg file that I use to create a bitmap if that is easier.
android rotation bitmap
user999764 Dec 22 '11 at 19:20 2011-12-22 19:20
source share