flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik J. Thomas" <e...@linqto.com>
Subject Android Images Rotated
Date Mon, 12 Jun 2017 23:35:54 GMT
Hey all:

I'm allowing a user to take a profile selfie or import a file from their camera roll, and
on Android, the images are rotated inconsistently between front and rear cameras, as well
as when importing from camera roll depending on how the user held the camera.



The MediaEvent (upon selecting an image) and MediaPromise object (data) does not provide any
orientation information and the image's sourceWidth is ALWAYS larger than sourceHeight no
matter which camera or mode (portrait/landscape) was used to take the picture. So there is
no way to know how much to rotate the image.

My problem is:
I need to know if a photo taken with CameraUI was front or back camera.
I need to know if a photo imported using CameraRoll was originally taken with front or back
camera, and whether the user held the camera in portrait or landscape mode. 
Each of these variables result in different rotations of the image and I need to correct the
rotation (that's easy) once I know by how much it's off.

I don't have any problem on iOS at all. Apple is consistent. I'm figuring I'll have to give
my users the ability to manually rotate their pics, or write an ANE or something else hard
to do just to get more information about the images on Android.

Any ideas?

Thanks.

Erik




Mime
View raw message