question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expo Camera - Incorrect orientation of captured photo if device orientation is locked

See original GitHub issue

Summary

When capturing a photo via the Expo Camera component, if the device is orientation locked in Portrait for example, and you then rotate to Landscape, the resulting photo is captured in Portrait. The iOS camera app and native SDK will ignore the system portrait lock setting when capturing photos.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS

SDK Version (managed workflow only)

44.0.0

Environment

expo-env-info 1.0.2 environment info: System: OS: macOS 12.2.1 Shell: 5.8 - /bin/zsh Binaries: Node: 17.4.0 - /usr/local/bin/node Yarn: 1.22.11 - /usr/local/bin/yarn npm: 8.3.1 - /usr/local/bin/npm Watchman: 2022.01.31.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /Users/nick/.rvm/gems/ruby-3.0.0/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7678000 Xcode: 13.3/13E113 - /usr/bin/xcodebuild npmPackages: @expo/webpack-config: ~0.16.2 => 0.16.16 expo: ^44.0.0 => 44.0.5 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-web: 0.17.1 => 0.17.1 npmGlobalPackages: eas-cli: 0.39.0 expo-cli: 5.0.3 Expo Workflow: managed

Reproducible demo

Embed this component into any view and then enable rotation lock on your device, then take a photo.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
Luke20wcommented, Nov 26, 2022

@yohamta Nothing I’ve seen. I’m thinking of making a Flutter app instead and hoping that doesn’t have the same problem

1reaction
asicdesigncommented, Oct 6, 2022

We ended up switching to React Native Camera. It is old and deprecated, but works. You could look at React Native Vision Camera.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Camera - Expo Documentation
expo -camera provides a React component that renders a preview for the device's front or ... Photos are rotated to match device's orientation...
Read more >
Why does an image captured using camera intent gets rotated ...
Rotate the image to the right orientation only if it was rotate 90, 180 or 270 degree. Recycle the rotated image for memory...
Read more >
Photo orientation. Survey123 app - Esri Community
I am trying to get the orientation of the photo taken in survey123 ... the photo with the device horizontally, the direction is...
Read more >
CameraX use case rotations - Android Developers
The following examples show what the image rotation should be depending on the camera sensor orientation. They also assume the target rotation is...
Read more >
What is the correct way to set target resolution when display ...
but I can't change target resolution as capture usecase is already built and bound to camera at the moment when OrientationEventListener ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found