-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 image stretched but fixed when height value updates.💭 #2638
Comments
I think this might be a duplicate of #2583 |
I too am seeing this same issue since updating from I get an error message, which I do not understand since I am using the
const cameraRef = useRef<Component<AnimatedProps<CameraProps>>>(null);
const device = useCameraDevice('back', {
physicalDevices: ['ultra-wide-angle-camera', 'wide-angle-camera'],
});
const isFocused = useIsFocused();
const isForeground = useIsForeground();
const isActive = isFocused && isForeground;
useEffect(
function checkPermissions() {
const status = Camera.getCameraPermissionStatus();
setCameraPermission(status);
if (cameraPermission === 'granted') return;
Camera.requestCameraPermission();
},
[cameraPermission]
);
{!!device && (
<Reanimated.View>
<Camera
animatedProps={animatedProps}
device={device}
isActive={isActive}
photo
ref={cameraRef}
style={styles.cameraContainer}
/>
</Reanimated.View>
)} All I did was upgrade my RNVC package to |
Hey! I just released a new V4 beta (v4.0.0-beta.7) where I fixed a bunch of issues! 💪🚀 Can you test that and see if that fixes the issue for you? 😅
You might need to increase the |
The stretched issue is fixed but then the onCodeScanned wont be trigger when scanning qr/barcodes |
Anyone here using Expo with Android SDK (34)? |
I just fixed the Code Scanner issue in the latest V4 beta. |
Tested with the V4 beta and works normally! |
I was having a similar issue. The frame width and height were coming out equal when they are not. The update fixed it! I I was also getting 10 FPS on a OnePlus5 device and now I'm getting 17. (I'm using a native Frame Processor). Great job man!! I love this library |
Thanks guys, great to hear that V4 now works perfectly! If you appreciate my work, please consider 💖 sponsoring me on GitHub 💖 so I can keep maintaining this library, fixing bugs and building new features! :) |
Can someone provide the patch for the issue so that I don't need to upgrade the SDK version. |
Question
I'm using version 3.9.0 of the vision camera. I made an app to take images with the camera and it works normal on a Redmi Xiaomi device. But when I use a samsung galaxy A12 for testing/developing the image I get from the camera is stretched. This is how my camera is defined. cameraheight = 16 / 9 * screen.width
What I tried
When I make any change to the style property of the camera, e.g. add 1 to the cameraheight. The images refreshes and is suddenly not stretched anymore. When the camera gets unloaded and loaded again the image is stretched again
VisionCamera Version
3.9.0
Additional information
The text was updated successfully, but these errors were encountered: