Skip to content

northfoxz/react-native-imagewand

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

react-native-imagewand

React native image wand view for android. Enabling you to do instagram like effects to images

Installation

npm i --save react-native-imagewand

Add it to your android project

  • In android/settings.gradle
...
include ':react-native-imagewand'
project(':react-native-imagewand').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-imagewand/android')
  • In android/app/build.gradle
dependencies {
  ...
  ...
  compile project(':react-native-imagewand')
}
  • register module (in MainActivity.java)
import com.reactImageWand.*;  // <--- import

public class MainActivity extends ReactActivity {
  ......
  @Override
  protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
      new RNImageWandPackage()     // <------ add here
    );
  }
  ......
}

Example

var ImageWand = require('react-native-imagewand');

var Example = React.createClass({

  render: function() {
    return (
      <ImageWand
        onImageInfo={this._imageInfo}
        shouldNotifyLoadEvents={true}
        src={'...'}
        blur={4}
      />
    );
  },
  _imageInfo: function(event){
    console.log(event.width, event.height);
  }
});

About

A image magic module for react native

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published