New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Camera Preview does not align with taken picture #2853
Comments
Hey! Preview is a video-stream, so it uses the aspect ratio from You could prioritize video aspect ratio by moving it up, but then the photo still looks different. I guess some photos just have a different aspect ratio for the photos stream or the video stream. Does it look proper when you set both |
I removed all filters, only put in a It just feels like I think after all this testing, im just going to use TL;DR And maybe recommend to delete this prop since it doesn't seem to do much with v4 just causes confusion? Or I'm still doing something wrong. |
Not true. On iOS it works fine. Also it does change behaviour on Android. Why would I delete that prop? |
Seems related to this issue: #2845 |
I am also facing this issue with iPad Pro 10.5 inch(17.4.1) in front camera, for back camera it is working fine and i also tested with android 12 (vivo s1 pro) it is working good.
|
What's happening?
After upgrading to v4 (from v3) the preview with
resizeMode='contain'
is not respecting the cameraFormats aspect ratios.In my use-case for react-native-vision-camera, I need to allow my users to align fairly precisely with the Preview view so when they do take a picture its aligned.
I am using ML models for object detection, but at the moment after the picture is taken. (I've already dabbled with frame processors to do the ML, but I have some improvements in my ML model to do first)
In the Example App, resizeMode is not used. Is the resizeMode prop mostly dead with v4?
Example Reproduction Code: https://github.com/Zoxive/ReactNativeVisionCamera_PreviewBug
Video Recordings Examples
using resizeMode = 'contain'
visioncamera_contain.mp4
using resizeMode = 'cover'
visioncamera_cover.mp4
Possibly Similar Issue: #2843
Reproduceable Code
Relevant log output
Camera Device
Device
Google Pixel 6 Pro
VisionCamera Version
4.0.3
Can you reproduce this issue in the VisionCamera Example app?
I reproduced with an empty Expo App.
Additional information
The text was updated successfully, but these errors were encountered: