Skip to content

Commit 6af3c95

Browse files
committed
Updated documentation
1 parent fd7a1f7 commit 6af3c95

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# React Native Document Scanner (iOS only)
44

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 !
66

77
Features :
88
- Live detection
@@ -39,6 +39,7 @@ class YourComponent extends Component {
3939
return (
4040
<View>
4141
<DocumentScanner
42+
useBase64
4243
onPictureTaken={data => this.setState({
4344
image: data.croppedImage,
4445
initialImage: data.initialImage,
@@ -75,6 +76,7 @@ class YourComponent extends Component {
7576
| saturation | `1` | `float` | Increase or decrease camera saturation. Set `0` for black & white |
7677
| contrast | `1` | `float` | Increase or decrease camera contrast. Normal as default |
7778
| 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 |
7880

7981
## Manual capture
8082

@@ -111,7 +113,7 @@ Enum (0, 1 or 2) corresponding to the type of rectangle found
111113

112114
| Prop | Params | Type | Description |
113115
| :----------- |:-------:| :--------:| :----------|
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' }` |
115117

116118

117119

0 commit comments

Comments
 (0)