i am trying to do a live stream camera by doing the following
but i got a problem when i load the bmp to camviewimage.bitmap the image comes out with a wrong orientation as if it was on landscape mode.
my phone was in portrait mode also my app supportedOrientations is set to portrait
what i am doing wrong ?
B4X:
Sub camera_Preview(Data() As Byte)
Dim jpeg() As Byte = camera1.PreviewImageToJpeg(Data, 70)
Log(jpeg.Length)
Dim ins As InputStream
Dim bmp As Bitmap
ins.InitializeFromBytesArray(jpeg, 0, jpeg.Length)
bmp.Initialize2(ins)
camviewimage.Bitmap = bmp
End Sub
but i got a problem when i load the bmp to camviewimage.bitmap the image comes out with a wrong orientation as if it was on landscape mode.
my phone was in portrait mode also my app supportedOrientations is set to portrait
what i am doing wrong ?