Skip to content

Unable to pick a local image #2

@gourav-singhal

Description

@gourav-singhal

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);
      }
    );
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions