react-native-camera-kit
react-native-camera-kit copied to clipboard
Ratio Overlay calculation display issue
Issue Description
Cheers for the work guys. this may be a misunderstanding from my side but I am not quite sure. Applying the ratioOverlay
other than 1:1 appears to be displaying inverted and the ratio is inaccurate
Steps to Reproduce / Code Snippets / Screenshots
preview: {
position: `absolute`,
bottom: 0,
right: 0,
top:0,
left:0,
},
<CameraKitCamera
ref={cam => this.camera = cam}
style={styles.preview}
cameraOptions={{
flashMode: `auto`, // on/off/auto(default)
focusMode: `on`, // off/on(default)
zoomMode: `on`, // off/on(default)
ratioOverlay:`4:5`, // optional, ratio overlay on the camera and crop the image seamlessly
ratioOverlayColor: `#00000077`, // optional
}}
/>
Produces this
<CameraKitCamera
ref={cam => this.camera = cam}
style={styles.preview}
cameraOptions={{
flashMode: `auto`, // on/off/auto(default)
focusMode: `on`, // off/on(default)
zoomMode: `on`, // off/on(default)
ratioOverlay:`5:4`, // optional, ratio overlay on the camera and crop the image seamlessly
ratioOverlayColor: `#00000077`, // optional
}}
/>
Produces this
Neither are 4:5 ratio and its my understanding ratio is width:height
. Perhaps its a problem with my usage. thanks for any help
Environment
react-native-cli: 2.0.1 react-native: 0.54.2 react-native-navigation: 1.1.466
- Platform: iOS
- Device info: All devices, iOS 11, Debug
Same