Skip to content

Commit

Permalink
Merge pull request react-native-camera#2651 from kant/patch-2
Browse files Browse the repository at this point in the history
Fixed typo on line 91
  • Loading branch information
MateusAndrade committed Dec 26, 2019
2 parents 84cf1df + 2bb2540 commit e274842
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/QA.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ dependencies {
## How can I resize captured images?

Currently, `RNCamera` does not allow for specifying the desired resolution of the captured image, nor does it natively expose any functionality to resize images.
One way to achieve this (without any additional dependencies )is using [react-native.ImageEditor.cropImage](https://facebook.github.io/react-native/docs/imageeditor.html#cropimage).
One way to achieve this (without any additional dependencies ) is using [react-native.ImageEditor.cropImage](https://facebook.github.io/react-native/docs/imageeditor.html#cropimage).

The strategy is:

1. Capture an image using `RNCamera`, which uses the device's max resolution.
2. Use `react-native.ImageEditor.cropImage()` to crop the image using the image's native size as the crop size (thus maintaiing the original image), and the desired new size as the `displaySize` attribute (thus resizing the image).
2. Use `react-native.ImageEditor.cropImage()` to crop the image using the image's native size as the crop size (thus maintaining the original image), and the desired new size as the `displaySize` attribute (thus resizing the image).

```javascript
import React, { PureComponent } from 'react';
Expand Down

0 comments on commit e274842

Please sign in to comment.