rn-camera-crop
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

rn-camera-crop

camera with crop functionality

Installation

npm install rn-camera-crop

or

yarn add rn-camera-crop

Note

This library depends upon expo. If you're using it on a bare react-native project, please setup expo first.

Afer successfully setting up the expo install the peer dependencies-

expo-cli install expo-camera expo-image-manipulator

Usage

import CameraModule from "rn-camera-crop";

// ...

const onSuccess = (uri: string) => {
    // do whatever you want
}

const onError = (error: Error) => {
    // do whatever you want
}

<CameraModule
    rectType='A4'
    enableCrop
    enablePreview
    onCaptureSuccess={onSuccess}
    onCaptureError={onError}/>

If you are getting this error Could not find com.google.android:cameraview:1.0.0 while building your project. Try to add this line- android/build.gradle at the bottom of allprojects -> repositories

maven { url "$rootDir/../node_modules/expo-camera/android/maven" }

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i rn-camera-crop

Weekly Downloads

15

Version

2.0.1

License

MIT

Unpacked Size

116 kB

Total Files

26

Last publish

Collaborators

  • veerusandy
  • nikhil2882
  • piyushsharma