cozy/react-native-document-scanner ? reverse-engineered prompt
Reverse engineered prompt
Build me a React Native document scanner component that uses the phone camera to automatically detect a sheet of paper, draw an outline around it, and capture it once the document is stable in frame.
I want it to work on iPhone and Android, with a simple component I can drop into my app. It should let me turn the flash on or off, switch to the front camera on iPhone if needed, tweak image look a bit like brightness, saturation, contrast, and control image quality. After capture, it should return the cropped document image and the original image, and if possible give me the detected corners too.
Please include the basic permission handling for camera access, and make it clear what needs to be added in the app settings for iOS and Android so it actually runs on a real device. It should also support a manual capture method if I want to trigger it myself. If you need to check the latest React Native or native camera docs online, go ahead.
Are you gonna build this?
make sure you review the code using coderabbit