# @remobile/react-native-image-edit

> A image edit module for react-native support for ios and android

Latest version **1.0.1** (published 2020-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @remobile/react-native-image-edit
pnpm add @remobile/react-native-image-edit
yarn add @remobile/react-native-image-edit
bun add @remobile/react-native-image-edit
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-09-13 |
| First published | 2020-09-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 33 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | YunJiang.Fang |
| Maintainers | honggao, fov42550564 |
| Keywords | react-native, react-component, ios, android, image, edit, remobile, mobile |

## Links

- npm: https://www.npmjs.com/package/@remobile/react-native-image-edit
- Repository: https://github.com/remobile/react-native-image-edit
- Issues: https://github.com/remobile/react-native-image-edit/issues
- npm.io page: https://npm.io/package/@remobile/react-native-image-edit

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-09-13
- 1.0.0 — 2020-09-13

## README

# React Native ImageEdit (remobile)
A image edit for react-native support for ios and android

## Installation
```sh
npm install @remobile/react-native-image-edit --save
```

### Installation (iOS)
* Drag RCTImageEdit.xcodeproj to your project on Xcode.
* Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTImageEdit.a from the Products folder inside the RCTImageEdit.xcodeproj.
* Look for Header Search Paths and make sure it contains both $(SRCROOT)/../../../react-native/React as recursive.

### Installation (Android)
```gradle
...
include ':react-native-image-edit'
project(':react-native-image-edit').projectDir = new File(settingsDir, '../node_modules/@remobile/react-native-image-edit/android')
```

* In `android/app/build.gradle`

```gradle
...
dependencies {
    ...
    compile project(':react-native-image-edit')
}
```

* register module (in MainApplication.java)

```java
......
import com.remobile.imageedit.RCTImageEditPackage;  // <--- import

......

@Override
protected List<ReactPackage> getPackages() {
   ......
   new RCTImageEditPackage(),            // <------ add here
   ......
}

```

## Usage

### Example
```js
const ImageEdit = require('@remobile/react-native-image-edit');
......
async doRotate (isLeft) {
    const uri = this.state.image.uri;
    const image = await ImageEdit.edit(uri, [ { rotate: isLeft ? -90 : 90 } ]);
    this.setState({ image: null }, () => {
        this.setState({ image });
    });
},
async doFlip (isVertical) {
    const uri = this.state.image.uri;
    const image = await ImageEdit.edit(uri, [ { flip: isVertical ? { vertical: true } : { horizontal: true } } ]);
    this.setState({ image: null }, () => {
        this.setState({ image });
    });
},

```

### see detail use
* https://github.com/remobile/react-native-template

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