react-native-camera-kit icon indicating copy to clipboard operation
react-native-camera-kit copied to clipboard

[ios 14] wrong orientation

Open lunajing opened this issue 4 years ago • 8 comments

when I use iOS 14 device take a picture, I got wrong orientation of Image.

Screen Shot 2021-01-07 at 10 30 13 AM

-- debug it, I got [UIDevice currentDevice].orientation == UIDeviceOrientationPortrait as picture above, the orientation value is 1, but after captureStillImageAsynchronouslyFromConnection, the orientation in imageDataSampleBuffer is 6. And final Image's orientation is 6 too.

lunajing avatar Jan 07 '21 03:01 lunajing

In Portrait, camera looks good but if I change to landscape then camera is not rotating correctly it shows image in opposite direction.

mayanak-shah avatar Mar 01 '21 22:03 mayanak-shah

This still seems to be an issue

PeterFred avatar May 22 '23 23:05 PeterFred

Still it is an issue. Working perfectly when screen is in PORTRAIT mode but not rotating when screen is in LANDSCAPE mode. Anyone please 🥴

@aarongrider ser please 🙏

anisurrahman072 avatar May 25 '23 07:05 anisurrahman072

Should be fixed by #547

DavidBertet avatar Jul 07 '23 05:07 DavidBertet

To elaborate on David's comment, while mostly fixed, many of these issues are caused by the rotation of the UI. I highly recommend locking the UI orientation to portrait and optionally using the onOrientationChange event handler to rotate UI elements manually. This is what the native iOS+Android camera does on phones.

The problem is that iOS does not expose what orientation the phone is in if the user uses orientation lock, which means we cannot reliably know which orientation the phone should be considered to be in. So we are integrating accelerometer readings into the camera to interpret it, so pictures get orientated the way you'd expect (instead of what the OS reports).

scarlac avatar Jul 07 '23 17:07 scarlac

@scarlac when you guys planing to release this new feature?

asimyaramis avatar Jul 18 '23 18:07 asimyaramis

We are preparing a beta release soon. You will be able to update to that one until we do a full release once it’s been battle tested and docs are fully up to date

scarlac avatar Jul 18 '23 19:07 scarlac

This is working for me on beta v14

WilliamWelsh avatar Aug 23 '23 20:08 WilliamWelsh