# react-native-perspective-smart-image-cropper

> React native library detecting documents with custom crop and perspective corrections on photos

Latest version **0.5.0** (published 2021-07-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-perspective-smart-image-cropper
pnpm add react-native-perspective-smart-image-cropper
yarn add react-native-perspective-smart-image-cropper
bun add react-native-perspective-smart-image-cropper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2021-07-28 |
| First published | 2021-07-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 906.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | shipanliu |
| Maintainers | shipanliu |
| Keywords | react-native, scanner, crop, document |

## Links

- npm: https://www.npmjs.com/package/react-native-perspective-smart-image-cropper
- Repository: https://github.com/ShipanLiu/react-native-perspective-smart-image-cropper
- Homepage: https://github.com/ShipanLiu/react-native-perspective-smart-image-cropper.git
- Issues: https://github.com/ShipanLiu/react-native-perspective-smart-image-cropper/issues
- npm.io page: https://npm.io/package/react-native-perspective-smart-image-cropper

## Dependencies (3)

- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^6.11.0
- [react-native-image-size](https://npm.io/package/react-native-image-size.md) ^1.1.3

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 0.5.0 (latest) — 2021-07-28

## README

# 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

```javascript
<CustomCrop ref={ref => (this.customCrop = ref)} />
```

- Then call :

```javascript
this.customCrop.current.crop();
```

---
_Source: https://npm.io/package/react-native-perspective-smart-image-cropper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
