|
2 | 2 |
|
3 | 3 | # React Native Document Scanner (iOS only) |
4 | 4 |
|
5 | | -Live document detection library. Returns a base64 encoded string of the captured image, allowing you to easily store it or use it as you wish ! |
| 5 | +Live document detection library. Returns either a URI or a base64 encoded string of the captured image, allowing you to easily store it or use it as you wish ! |
6 | 6 |
|
7 | 7 | Features : |
8 | 8 | - Live detection |
@@ -39,6 +39,7 @@ class YourComponent extends Component { |
39 | 39 | return ( |
40 | 40 | <View> |
41 | 41 | <DocumentScanner |
| 42 | + useBase64 |
42 | 43 | onPictureTaken={data => this.setState({ |
43 | 44 | image: data.croppedImage, |
44 | 45 | initialImage: data.initialImage, |
@@ -75,6 +76,7 @@ class YourComponent extends Component { |
75 | 76 | | saturation | `1` | `float` | Increase or decrease camera saturation. Set `0` for black & white | |
76 | 77 | | contrast | `1` | `float` | Increase or decrease camera contrast. Normal as default | |
77 | 78 | | quality | `0.8` | `float` | Image compression. Reduces both image size and quality | |
| 79 | +| useBase64 | `false` | `bool` | If base64 representation should be passed instead of image uri's | |
78 | 80 |
|
79 | 81 | ## Manual capture |
80 | 82 |
|
@@ -111,7 +113,7 @@ Enum (0, 1 or 2) corresponding to the type of rectangle found |
111 | 113 |
|
112 | 114 | | Prop | Params | Type | Description | |
113 | 115 | | :----------- |:-------:| :--------:| :----------| |
114 | | -| onPictureTaken | `data` | `object` | Returns the captured image in an object `{ croppedImage: 'BASE64 string', initialImage: 'BASE64 string', rectangleCoordinates: 'object of coordinates' }` | |
| 116 | +| onPictureTaken | `data` | `object` | Returns the captured image in an object `{ croppedImage: ('URI or BASE64 string'), initialImage: 'URI or BASE64 string', rectangleCoordinates: 'object of coordinates' }` | |
115 | 117 |
|
116 | 118 |
|
117 | 119 |
|
|
0 commit comments