Hello,
With CameraIntent, and the code below, photos taken in portrait mode are automatically rotated to landscape mode. What is the code please to keep them then save in portrait mode.
Thank you
B4X:
Sub TakePicture
Dim i As Intent
i.Initialize("android.media.action.IMAGE_CAPTURE", "")
File.Delete(Starter.provider.SharedFolder, tempImageFile)
Dim u As Object = Starter.provider.GetFileUri(tempImageFile)
i.PutExtra("output", u) 'the image will be saved to this path
Try
StartActivityForResult(i)
Catch
ToastMessageShow("Camera is not available.", True)
Log(LastException)
End Try
End Sub
for android, normal camera mode is landscape. you've got to handle the
righting yourself (or with a library, eg, jpegutils). in any case, not all camera
apps handle things the same way. and in android's case, not all versions
handle things the same way. it's not such a big deal if you know how the
device's camera app is going to handle the image. otherwise, you have to
manage the camera yourself, which will still probably involve rotating.