Socket
Socket
Sign inDemoInstall

@oguzhnatly/react-native-image-manipulator

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oguzhnatly/react-native-image-manipulator - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

CHANGELOG.md

5

package.json
{
"name": "@oguzhnatly/react-native-image-manipulator",
"version": "1.0.0",
"version": "1.0.1",
"description": "ImageManipulator for react native without Expo and Unimodules. Based on Expo ImageManipulator",

@@ -8,3 +8,4 @@ "main": "index.js",

"homepage": "https://github.com/oguzhnatly/react-native-image-manipulator",
"license": "MIT"
"license": "MIT",
"typings": "index.d.ts"
}

80

README.md

@@ -1,3 +0,39 @@

### `ImageManipulator.manipulate(uri, actions, saveOptions)`
## Getting started
`$ npm install @oguzhnatly/react-native-image-manipulator --save`
### OR
`$ yarn add @oguzhnatly/react-native-image-manipulator`
### Mostly automatic installation
`$ react-native link react-native-image-manipulator`
### Manual installation
#### iOS
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `@oguzhnatly` ➜ `react-native-image-manipulator` and add `RNImageManipulator.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNImageManipulator.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<
#### Android
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.reactnativeimagemanipulator.RNImageManipulatorPackage;` to the imports at the top of the file
- Add `new RNImageManipulatorPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-image-manipulator'
project(':react-native-image-manipulator').projectDir = new File(rootProject.projectDir, '../node_modules/@oguzhnatly/react-native-image-manipulator/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-image-manipulator')
```
### `RNImageManipulator.manipulate(uri, actions, saveOptions)`
Manipulate the image provided via `uri`. Available modifications are rotating, flipping (mirroring), resizing and cropping. Each invocation results in a new file. With one invocation you can provide a set of actions to perform over the image. Overwriting the source file would not have an effect in displaying the result as images are cached.

@@ -33,3 +69,3 @@

import { Button, TouchableOpacity, Text, View, Image } from "react-native";
import ImageManipulator from "react-native-image-manipulator";
import RNImageManipulator from "@oguzhnatly/react-native-image-manipulator";

@@ -67,3 +103,3 @@ import Colors from "../constants/Colors";

_rotate90andFlip = async () => {
const manipResult = await ImageManipulator.manipulate(
const manipResult = await RNImageManipulator.manipulate(
this.state.image.localUri || this.state.image.uri,

@@ -93,38 +129,2 @@ [{ rotate: 90 }, { flip: { vertical: true } }],

}
```
## Getting started
`$ npm install @oguzhnatly/react-native-image-manipulator --save`
### OR
`$ yarn add @oguzhnatly/react-native-image-manipulator`
### Mostly automatic installation
`$ react-native link react-native-image-manipulator`
### Manual installation
#### iOS
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-image-manipulator` and add `RNImageManipulator.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNImageManipulator.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<
#### Android
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.reactnativeimagemanipulator.RNImageManipulatorPackage;` to the imports at the top of the file
- Add `new RNImageManipulatorPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-image-manipulator'
project(':react-native-image-manipulator').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-image-manipulator/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-image-manipulator')
```
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc