Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to pick a local image #2

Open
gourav-singhal opened this issue Oct 13, 2016 · 2 comments
Open

Unable to pick a local image #2

gourav-singhal opened this issue Oct 13, 2016 · 2 comments

Comments

@gourav-singhal
Copy link

gourav-singhal commented Oct 13, 2016

I am unable to pick a image from my local project.
The error I am getting is :-

TypeError : expected dynamic type 'string' but had type 'int64' for ImageRotateModule.rotateImage at argument index 0

Below is the code :-

rotate(angle) {
    debugger;
    const nextAngle = this.state.currentAngle + angle;
    ImageRotate.rotateImage(
      require('../images/bus.png'),  <--- returns an integer value
      nextAngle,
      (uri) => {
        var data = {uri : uri ,nextAngle : nextAngle}
        return data;
      },
      (error) => {
        console.error(error);
      }
    );
  }
@xavimb
Copy link

xavimb commented Oct 27, 2017

One year later, but have you tried using react-native-fs? You can use RNFS.MainBundlePath and from there navigate to wherever you have the image. I haven't tried personally, but that might help.

@filipef101
Copy link

Have you solved it? I'm face the same but I just place the image on the drawable and xcode assets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants