capacitor-community / capacitor-community/camera-preview
iOS, a picture taken in the landscape orientation is captured as a portrait photo.
- Dominant language
- Java
- Stars
- 227
- Forks
- 185
- PR merge metrics
- No merged PRs in 30d
Description
**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);
```
3. Rotate the phone into the landscape
4. Capture the photo
```
const cameraPreviewPictureOptions: CameraPreviewPictureOptions = {
quality: 90,
};
const result = await CameraPreview.capture(cameraPreviewPictureOptions);
```
6. 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
Contributor guide
Assessment
This issue has not been assessed yet.