Just when I was sure I had finished my application I noticed that the photos it takes in some phones is rotated to the side. Searching the forum I found that Simple Media Manager can manage this situation. I tried to add it but I was not successful in getting the imageview to a bmp. I get the error that bmp is not initialized. What can I do?
I use this code:
I use this code:
B4X:
'pnlCurrent is not visible
smm.SetMediaFromFile(pnlCurrent, xui.Defaultfolder , "1.jpg", "image/*", Null)
Dim iCountViews As Int
For Each v As B4XView In pnlCurrent.GetAllViewsRecursive
iCountViews = iCountViews + 1
Next
Log(iCountViews)
If pnlCurrent.GetView(0) Is ImageView Then
Log("ImageView")
End If
If pnlCurrent.GetView(0) Is Panel Then
Log("Panel")
End If
Dim bmp As B4XBitmap = pnlCurrent.GetView(0).GetBitmap
' Dim out As OutputStream = File.OpenOutput(xui.Defaultfolder, "2.jpg", False)
' bmp.WriteToStream(out, 100, "JPG")
' out.Flush
' out.Close