This b4a code
Note that the size of the BMP after rotation is changed accordingly.
I want to know how to write b4i code?
B4X:
Sub RotateImage(original As Bitmap, degree As Float) As Bitmap
Dim matrix As JavaObject
matrix.InitializeNewInstance("android.graphics.Matrix", Null)
matrix.RunMethod("postRotate", Array(degree))
Dim bmp As JavaObject
bmp.InitializeStatic("android.graphics.Bitmap")
Dim NewImage As Bitmap = bmp.RunMethod("createBitmap", Array(original, 0, 0, original.Width, original.Height, _
matrix, True))
Return NewImage
End Sub
Note that the size of the BMP after rotation is changed accordingly.
I want to know how to write b4i code?