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.

iOS, a picture taken in the landscape orientation is captured as a portrait photo.

See original GitHub issue

Describe the bug I might be doing something wrong, but pictures taken using iPhone X in the landscape orientation are captured as portrait photos. Android works correctly. I can not figure out how to take landscape picture in iOS. i tried to play with rotateWhenOrientationChanged without any luck.

To Reproduce Steps to reproduce the behavior:

  1. Start Preview
 const cameraPreviewOptions: CameraPreviewOptions = {
            position: 'rear',
            parent: 'cameraPreview',
            className: 'cameraPreview',
            rotateWhenOrientationChanged: true,
            toBack: true,
            storeToFile: true,
        };

        await CameraPreview.start(cameraPreviewOptions);
  1. Rotate the phone into the landscape
  2. Capture the photo
const cameraPreviewPictureOptions: CameraPreviewPictureOptions = {
            quality: 90,
        };

        const result = await CameraPreview.capture(cameraPreviewPictureOptions);
  1. Captured image will be a portrait image with the picture rotated 90 degrees. Essentially its impossible to capture landscape image in iOS

Expected behavior Captured image should be landscape

Smartphone (please complete the following information):

  • Device: iPhone X Max
  • OS: 15.5
  • Browser stock browser, safari

Additional context

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
orestcommented, Jul 25, 2022

@pbowyer I think it’s ready to be merged. Thank you!

2reactions
pbowyercommented, Jul 25, 2022

@orest Were you able to test this? I’d like to merge it into the next release if it’s working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

iphone pictures rotate from orientation a… - Apple Community
iphone 6s ios 15.4.1. When I take photos I decide how I like the layout to become either portrait or landscape as I...
Read more >
How to check iPhone photo orientation before taking a picture
This step by step guide with images covers how to check your iPhone photo orientation before taking a photo in one simple step....
Read more >
How to Check iPhone Camera Orientation When Taking ...
The iPhone camera can take photos in vertical orientation or ... when you're taking a photo in either landscape or portrait orientation ......
Read more >
Here's how to avoid photo turn sideways when taking ...
Taking photos or capturing videos in landscape mode / landscape orientation but annoyed with the results – they are captured as portrait ......
Read more >
How to produce landscape or portrait photo base on device ...
Convert that into the correct videoOrientation . Apply that to the session's output's connection. Capture the image.
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