Hi
I have a problem with RunMethod "CreateBitmap function" that I use to rotate Images.
In some devices it works well, in others I get a error. What I noticed is that the problem is present with big images (for example 1600x1200 or more) With smaller images it works always well.
Do you know how to overcome this problem?
Sub RotateImage(BM As Bitmap, degree As Float) As Bitmap
Dim matrix As JavaObject
Dim bmp As JavaObject
matrix.InitializeNewInstance("android.graphics.Matrix", Null)
matrix.RunMethod("postRotate",Array As Object(degree))
bmp.InitializeStatic("android.graphics.Bitmap")
Dim NewImage As Bitmap = bmp.RunMethod("createBitmap", Array As Object(BM, 0, 0, BM.Width, BM.Height, matrix, True))
Return NewImage
End Sub
Thank you
Giuliano C.
I have a problem with RunMethod "CreateBitmap function" that I use to rotate Images.
In some devices it works well, in others I get a error. What I noticed is that the problem is present with big images (for example 1600x1200 or more) With smaller images it works always well.
Do you know how to overcome this problem?
Sub RotateImage(BM As Bitmap, degree As Float) As Bitmap
Dim matrix As JavaObject
Dim bmp As JavaObject
matrix.InitializeNewInstance("android.graphics.Matrix", Null)
matrix.RunMethod("postRotate",Array As Object(degree))
bmp.InitializeStatic("android.graphics.Bitmap")
Dim NewImage As Bitmap = bmp.RunMethod("createBitmap", Array As Object(BM, 0, 0, BM.Width, BM.Height, matrix, True))
Return NewImage
End Sub
Thank you
Giuliano C.