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

Ratio Overlay calculation display issue

Open brenwell opened this issue 6 years ago • 1 comments

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

img_0181

                <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

img_0179

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

brenwell avatar Jul 11 '18 10:07 brenwell

Same

razor2022 avatar Dec 05 '21 16:12 razor2022