Closed joshwinter closed 5 years ago
@joshwinter i just check that we have to pass the given image height and width also than we will get the exact cropped image see...
<AmazingCropper onDone={this.onDone} onCancel={this.onCancel} imageUri={this.state.image.uri} imageWidth={this.state.image.width} imageHeight={this.state.image.height} NOT_SELECTED_AREA_OPACITY={0.3} BORDER_WIDTH={20} />
try this...
Okay thanks! I will try now.
@Ektasahusahu Unfortunately, I just checked and I'm passing the width and height in the example, but it's still not returning the cropped image in the croppedImageUri variable. We're you able to get it working? If yes, does your code look like this?
<AmazingCropper
onDone={this.onDone}
onCancel={this.onCancel}
imageUri='https://www.lifeofpix.com/wp-content/uploads/2018/09/manhattan_-11-1600x2396.jpg'
imageWidth={1600}
imageHeight={2396}
NOT_SELECTED_AREA_OPACITY={0.3}
BORDER_WIDTH={20}
/>
@ggunti Just wanted to see if you have problems on your end for Android or if I'm doing something wrong.
I just tested it and seems that it works also on android without any problems. Try to reproduce what I did.
My code:
When we run it:
Press DONE and obtain:
As you can see, the resulted image is the cropped one. I also tested it on real device and it worked.
Wonderful. Thank you very much for the code sample. There's something I'm doing wrong then. I'm going to try this today.
Hello,
For Android - after the crop is complete, it doesn't seem to be passing the actual cropped portion to the variable like it does in iOS, it's just returning the full image. Any clues as to what the problem may be?
onDone = croppedImageUri => {
Thanks!