You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The preview is shown correctly at 100x100, however it is distorted.
The video is stretched by a factor of 1.3333 (4/3).
What’s the easiest way to un-stretch the video? I’ve tried all sorts unsuccessfully and need help.
I assume I could crop the video somehow in the shader, but it would be easiest if I could crop the video before it’s passed to the shader.
See screen shots below, first with distortion is with the Camera preview using gl-react, and the second is just using the vanilla expo-camera component.
The text was updated successfully, but these errors were encountered:
Camera.ratio prop is valid only on Android. Camera.style.width and Camera.style.height seems to be used only when taking a snapshot by cropping the full image, only on iOS though.
Also, setting Camera.pictureSize seems to affect the ratio, but not the snapshot resolution (again, only on iOS)
Try callling Camera.getAvailablePictureSizesAsync and check if there are any available 1:1 ratios.
library version
[email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
bug report
I'm using the following code to display a 100 x 100 preview of the camera:
The preview is shown correctly at 100x100, however it is distorted.
The video is stretched by a factor of 1.3333 (4/3).
What’s the easiest way to un-stretch the video? I’ve tried all sorts unsuccessfully and need help.
I assume I could crop the video somehow in the shader, but it would be easiest if I could crop the video before it’s passed to the shader.
See screen shots below, first with distortion is with the Camera preview using gl-react, and the second is just using the vanilla expo-camera component.
The text was updated successfully, but these errors were encountered: