0.5.0 • Published 3 years ago

react-native-perspective-smart-image-cropper v0.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

React Native Document Scanner + image cropper 📐🖼

Document in progress...

React Native Document Scanner

Installation 🚀🚀

$ npm install https://github.com/rosenexpend/react-native-perspective-image-cropper.git --save

$ react-native link react-native-perspective-image-cropper

This library uses react-native-svg and react-native-image-size, you must install them too. See https://github.com/react-native-community/react-native-svg and https://github.com/eXist-FraGGer/react-native-image-size for more infos.

Android Only

If you do not already have openCV installed in your project, add this line to your settings.gradle

include ':openCVLibrary310'
project(':openCVLibrary310').projectDir = new File(rootProject.projectDir,'../node_modules/react-native-perspective-image-cropper/android/openCVLibrary310')

Crop image

  • First get component ref
<CustomCrop ref={ref => (this.customCrop = ref)} />
  • Then call :
this.customCrop.current.crop();