Hello everyone
Anyone use CameraExClass.SavePictureToFile function, the image will be saved rotated horizontally.
I changed this function to save picture as it without rotation, as the following:
It depend on BitmapExtended library.
Anyone use CameraExClass.SavePictureToFile function, the image will be saved rotated horizontally.
I changed this function to save picture as it without rotation, as the following:
B4X:
Public Sub SavePictureToFile(Data() As Byte, Dir As String, FileName As String)
Dim inp As InputStream
inp.InitializeFromBytesArray(Data,0,Data.Length)
Dim B As Bitmap
B.Initialize2(inp)
Dim bm2 As BitmapExtended
B=bm2.rotateBitmap(B,90)
Dim out As OutputStream=File.OpenOutput(Dir, FileName, False)
B.WriteToStream(out,100,"PNG")
out.Close
End Sub