react-native-vision-camera
react-native-vision-camera copied to clipboard
❓ The screen size is different before and after shooting (Android)
Question
const device = useCameraDevice('back', { physicalDevices: ['wide-angle-camera'], });
const cameraRef = useRef(null);
const format = useCameraFormat(device, [ { photoAspectRatio: Platform.OS === 'android' ? 1 : undefined, }, { photoResolution: { width: 1080, height: 1080, }, }, ]);
<Camera
device={device}
ref={cameraRef}
isActive={true}
photo={true}
video={false}
format={format}
style={{
width: width,
height: width,
}}
/>
What I tried
No response
VisionCamera Version
3.6.4
Additional information
- [ ] I am using Expo
- [X] I have read the Troubleshooting Guide
- [X] I agree to follow this project's Code of Conduct
- [X] I searched for similar questions in the issues page as well as in the discussions page and found none.
im having the same problem :/
@Felipe-OT Found it After setting the videoAspectTatio, the preview size and the size of the captured photo matched
Worked. Thanks!