iOS, a picture taken in the landscape orientation is captured as a portrait photo.
See original GitHub issueDescribe 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:
- Start Preview
const cameraPreviewOptions: CameraPreviewOptions = {
position: 'rear',
parent: 'cameraPreview',
className: 'cameraPreview',
rotateWhenOrientationChanged: true,
toBack: true,
storeToFile: true,
};
await CameraPreview.start(cameraPreviewOptions);
- Rotate the phone into the landscape
- Capture the photo
const cameraPreviewPictureOptions: CameraPreviewPictureOptions = {
quality: 90,
};
const result = await CameraPreview.capture(cameraPreviewPictureOptions);
- 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
- Capacitor 3.4.0
- @capacitor-community/camera-preview - 3.1.0
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pbowyer I think it’s ready to be merged. Thank you!
@orest Were you able to test this? I’d like to merge it into the next release if it’s working.