Replacing react-native-camera with react-native-vision-camera: Adding overlay images and reducing captured image size

526 Views Asked by At

I'm currently working on a React Native project and I need to replace the deprecated react-native-camera library with react-native-vision-camera. However, I'm facing a couple of challenges in the process.

  1. Overlay Images: With react-native-camera, I was able to add overlay images while capturing images. How can I achieve the same functionality with react-native-vision-camera? Are there any specific APIs or approaches I should follow?
  2. Reducing Captured Image Size: Another requirement is to reduce the size of the captured image. In the previous implementation, I was able to control the image quality and compression settings using react-native-camera. How can I achieve similar control with react-native-vision-camera to ensure smaller file sizes for the captured images?

I've already reviewed the documentation and examples provided by react-native-vision-camera, but couldn't find specific guidance on these topics. Any help or code snippets would be greatly appreciated.

Thank you in advance!

1

There are 1 best solutions below

1
Natalia On

With expo-camera you can do both things but you have to install the expo package. In case you only need a rectangle and same words overlaying the camera image you could use react-native-image-crop-picker.