google / cameraview

[DEPRECATED] Easily integrate Camera features into your Android app
Apache License 2.0
4.74k stars 1.03k forks source link

Add a getter to get the camera orientation relative to the devices native orientation #269

Open matt-oakes opened 5 years ago

matt-oakes commented 5 years ago

This is useful for when you are using the image data from the onFramePreview callback and need to correct the image rotation before sending it through to something like the Mobile Vision SDK.

The lack of this was causing libraries to make assumptions about the camera orientation which causes bugs like this: https://github.com/react-native-community/react-native-camera/issues/1714

matt-oakes commented 5 years ago

I realised that just after I made this. I've opened a PR over there including both parts https://github.com/react-native-community/react-native-camera/pull/2050