Hello,
I am using cam to make the user select a picture from the disk and save it to file.dirdocuments. After that I always load the saved picture as profile pic. BUT when I load the image selected from the cam, there is no problem but after I load the pic that I saved to file.dirdocuments it is always rotated 90 degress.
I use the following code to save the pic:
And to load:
How can I prevent the rotation?
I am using cam to make the user select a picture from the disk and save it to file.dirdocuments. After that I always load the saved picture as profile pic. BUT when I load the image selected from the cam, there is no problem but after I load the pic that I saved to file.dirdocuments it is always rotated 90 degress.
I use the following code to save the pic:
B4X:
Sub Cam_Complete (Success As Boolean, Image As Bitmap, VideoPath As String)
If Success Then
If Image.IsInitialized Then
imgmypic.Bitmap = Image
Dim out As OutputStream = File.OpenOutput(File.DirDocuments, "mypic.png", False)
Image.WriteToStream(out,100,"PNG")
out.Close
Else
End If
End If
End Sub
And to load:
B4X:
If File.Exists(File.DirDocuments,"mypic.png") Then
Log("exist")
imgmypic.Bitmap=LoadBitmap(File.DirDocuments,"mypic.png")
Else
Log("no")
End If
Else
How can I prevent the rotation?