gre / react-native-view-shot

Snapshot a React Native view and save it to an image
https://github.com/gre/react-native-view-shot-example
MIT License
2.66k stars 346 forks source link

Programmatically ScreenShot of Camera View #463

Closed subhahu-reddy closed 1 year ago

subhahu-reddy commented 1 year ago

I am using React native vision camera for pose detection and I want to take a screenshot programmatically after pose detection is done with the landmarks visible on the camera view

Need to know How can I do that

I tried taking a screenshot in react native using react-native-view-shot but this gives me a black screen in the camera view

Camera View is rendered on the GPU how to take a screenshot of that?

I took screenshots of just the camera view and the entire screen too iZd9Vt1k3U0SZ3 textKVU16Q

gre commented 1 year ago

i'm afraid this is out of scope of this library. unless you have a fix that makes it work, it is probably a technical problem at the native level & it is preferrable to try to look for a solution to directly use the camera api on the native side.